I gave Doom Emacs a try and thought it was neat; I just couldn't understand it. Later, I tried creating a config from scratch with some help from youtube; it started to become more clear. Emacs is just an elisp interpreter, and you can use functions to operate on the editor primatives like: window, buffer, face, point, etc. It was helpful, to me, to remove all the layers of abstraction in the way (packages that doom provides), to see what was going on. That said, I still have trouble with elisp.
Hi & FYI: * M-t to transpose "words" * C-t to transpose "chars" (Works of course also in a standard terminal (which uses Emacs-mode by default).) Of course Emacs can do lots of more transposing things -- e.g. C-x C-t to transpose "lines"... ...but that's probably beyond the scope. 😉
I copied a piece of elisp code from emacs redux that allowed me to transpose lines before I knew its has a built in function, its set to C-S . For lines I think it's better, but sweet for the words and char transpose
also I suppose that only char transpose would really be useful to correct mistypes, I hardly ever jumble up whole words 😂. But its just so natural to extend it because M is usually associated with linguistic elements, sentences, words etc whereas C is always for general elements. If I remember correctly it says this even in the tutorial!
These transpose commands also work on the bash shell where it is very handy if you tend to mix up the arguments on a fancy command. 😊 Me like emacs a lot 😊
skill issue. All these people who complain about emacs with these inane complaints are either low skilled lab rats or are just plain lying about using emacs. You need a full keyboard to use ms excel even properly, the most macro keys you need in vanilla emacs are Alt Ctrl C and X, rest is all your choice, brain dead trolls
Back in my DOS days in the late 80s, early 90s, i had a word processor that had the transpose words feature. It was a great feature and I'm surprised software like Word or LibreOffice don't have it. The program was some small one, came with stickers for your keys with the different functions marked on them.
Hey DT, I just started using doom emacs org for writing documents and taking notes. I'm having issues with org tables and cells containing sentences. and causing the whole table to wrap and basically make it unusable. Have you found a solution? There are some online, including in the org documentation, as well as switching to table.el then back to org table but I'm having trouble with the keybindings. I can't even seem to reduce the cell width to hide the contents? I'm guessing maybe the keybindings in Doom emacs are different or something, but I can't find any evidence of that. Have you found any solutions/workflows to do this more quickly and a little less painless? Any help would be super appreciated. P.S. your videos have been an amazing resource for doom Emacs. Thank you!
For that first example, I wouldn't use `dw` because then you have to go back one or possibly more had you used a different example line, I'd use `de` because it stops at the end of the word. If you really need to see the text as you're moving it, plugins exist for Vim to do just that. I also would avoid those single line mappings as it'd be better implemented as a function. Maybe do a custom build of Vim with some other language enabled, since it can use Python and I really want to see someone use an all Python .vimrc because that would be hilarious.
Excellent! This is the reason I keep viewing your posts. Not a fan of the non-tech but that is the nerd in me. 1st Amendment Rants are fine by me but I'll watch the tech and skip any other.
Backwards doesn't deal with spaces correctly if you're on the last word on a line. I've never had a need for these, but I don't do any novel writing type things, mostly just writing code and the occasional readme file.
Interesting. Hate to burst the bubble a bit, but the line up/down transposition exists in Notepad++ (and I guess notepadqq), and maybe even EditPlus 2 that I've used more than a decade ago. Ctrl+Shift and up or down arrow. Using this for over a decade feels so weird to see DT so happy and something so novel for him. Notepad++ doesn't seem to have the word/selection left/right transposition though. But I never felt like I needed it so... meh. Maybe it has it and I just don't know it because I didn't search for it. Still, the best features for both Emacs and (Neo)vim is that you can have not just custom bindings but custom code/functionality made and tailored exactly how you want it. They're basically Macros++ (I guess Emacs would be Macros#. Or should it be the other way around ?)
Useless and redundant emacs nonsense. in Vim: swap char => xp || xP swap line => ddp || ddkP || ddkp swap words => dawwP || dawelp || dawbP there are many more ways to achieve these, including visual mode commands and custom mappings or ex commands. The great thing about vim is that it is a language for editing text not just a set of macros, once you speak the language you can achieve anything.
emacs is not a programming language. lisp is, and that is irrelevant. Vim's text editing model is a language of its own that expresses how text should be manipulated. I didn't say its a programming language. Hope that helps. @@hdbrot
@@wolandsmachineMy "is" should be understood as "is completely controlled by" and you said "The great thing about vim is that it is a language", so you did the same.
Vim is a language != vim is a programming language. That should be obvious, and it differs emacs since emacs does not have the same notion on text editing that vim or vi does. Vim's language is far more sophisticated than memorizing shortcuts and calling macros, since you can even do that in ms-word. Vim's language follows a grammar of its own and by using it you are able to construct edits/macros/motions that would be impossible otherwise. @@hdbrot
On vim:
dw wP -> Switch with next word
dw bP -> Switch with previous word
If the cursor is at the middle of the word use "daw" instead.
The mastery of Emacs is a journey.
It is indeed.
I gave Doom Emacs a try and thought it was neat; I just couldn't understand it. Later, I tried creating a config from scratch with some help from youtube; it started to become more clear. Emacs is just an elisp interpreter, and you can use functions to operate on the editor primatives like: window, buffer, face, point, etc. It was helpful, to me, to remove all the layers of abstraction in the way (packages that doom provides), to see what was going on. That said, I still have trouble with elisp.
Hi & FYI:
* M-t to transpose "words"
* C-t to transpose "chars"
(Works of course also in a standard terminal (which uses Emacs-mode by default).)
Of course Emacs can do lots of more transposing things -- e.g. C-x C-t to transpose "lines"...
...but that's probably beyond the scope. 😉
I copied a piece of elisp code from emacs redux that allowed me to transpose lines before I knew its has a built in function, its set to C-S . For lines I think it's better, but sweet for the words and char transpose
also I suppose that only char transpose would really be useful to correct mistypes, I hardly ever jumble up whole words 😂. But its just so natural to extend it because M is usually associated with linguistic elements, sentences, words etc whereas C is always for general elements. If I remember correctly it says this even in the tutorial!
These transpose commands also work on the bash shell where it is very handy if you tend to mix up the arguments on a fancy command. 😊 Me like emacs a lot 😊
I once tried Emacs but I needed a keyboard with 105 macro keys to use it and my beard wasn't really long enough to use it to the full potential.
You probably went out in the sun and bathed too often, as well.
skill issue. All these people who complain about emacs with these inane complaints are either low skilled lab rats or are just plain lying about using emacs. You need a full keyboard to use ms excel even properly, the most macro keys you need in vanilla emacs are Alt Ctrl C and X, rest is all your choice, brain dead trolls
I grew a beard and made a custom keyboard layout, I am ready
Back in my DOS days in the late 80s, early 90s, i had a word processor that had the transpose words feature. It was a great feature and I'm surprised software like Word or LibreOffice don't have it.
The program was some small one, came with stickers for your keys with the different functions marked on them.
Hey DT, I just started using doom emacs org for writing documents and taking notes. I'm having issues with org tables and cells containing sentences. and causing the whole table to wrap and basically make it unusable. Have you found a solution? There are some online, including in the org documentation, as well as switching to table.el then back to org table but I'm having trouble with the keybindings. I can't even seem to reduce the cell width to hide the contents? I'm guessing maybe the keybindings in Doom emacs are different or something, but I can't find any evidence of that. Have you found any solutions/workflows to do this more quickly and a little less painless? Any help would be super appreciated.
P.S. your videos have been an amazing resource for doom Emacs. Thank you!
But, are all these additions already updated into DTOS? Minds inquiring know to want!
For that first example, I wouldn't use `dw` because then you have to go back one or possibly more had you used a different example line, I'd use `de` because it stops at the end of the word. If you really need to see the text as you're moving it, plugins exist for Vim to do just that. I also would avoid those single line mappings as it'd be better implemented as a function. Maybe do a custom build of Vim with some other language enabled, since it can use Python and I really want to see someone use an all Python .vimrc because that would be hilarious.
Is this a video about Emacs or about Vim?
Excellent! This is the reason I keep viewing your posts. Not a fan of the non-tech but that is the nerd in me. 1st Amendment Rants are fine by me but I'll watch the tech and skip any other.
Why use a plugin when it is easier just to set a keybinding for this?
dawwP
in vim (for swap forward and it doesn't matter where you are in the first word)
dawbP
(for backward swap)
Vim - rocks!
nuh uh! emacs rocks!
(i dont use either one, or any program like it either)
Backwards doesn't deal with spaces correctly if you're on the last word on a line. I've never had a need for these, but I don't do any novel writing type things, mostly just writing code and the occasional readme file.
Common Emacs W
I tried the transpose function: myself: "dt Trump sucks." After transposing "Trump" and "sucks" I get: "dt sucks Trump." Emacs is awesome!
Interesting. Hate to burst the bubble a bit, but the line up/down transposition exists in Notepad++ (and I guess notepadqq), and maybe even EditPlus 2 that I've used more than a decade ago. Ctrl+Shift and up or down arrow. Using this for over a decade feels so weird to see DT so happy and something so novel for him. Notepad++ doesn't seem to have the word/selection left/right transposition though. But I never felt like I needed it so... meh. Maybe it has it and I just don't know it because I didn't search for it.
Still, the best features for both Emacs and (Neo)vim is that you can have not just custom bindings but custom code/functionality made and tailored exactly how you want it. They're basically Macros++ (I guess Emacs would be Macros#. Or should it be the other way around ?)
Macros aren't a feature of Emacs, they're Emacs itself. It's even how it got its name.
@@dkosmari Ha, didn't knew that. But I'm not surprised.
Emacs is overrated. An os should do more than this.😅😅😅
👏🏻👏🏻👏🏻
Can you please make a video on hyprland?
first
Useless and redundant emacs nonsense.
in Vim:
swap char => xp || xP
swap line => ddp || ddkP || ddkp
swap words => dawwP || dawelp || dawbP
there are many more ways to achieve these, including visual mode commands and custom mappings or ex commands.
The great thing about vim is that it is a language for editing text not just a set of macros, once you speak the language you can achieve anything.
Smartest vim user right here.
What‘s the difference to emacs? It‘s also a programming language and when you know the language, you can achieve anything.
emacs is not a programming language. lisp is, and that is irrelevant. Vim's text editing model is a language of its own that expresses how text should be manipulated. I didn't say its a programming language.
Hope that helps. @@hdbrot
@@wolandsmachineMy "is" should be understood as "is completely controlled by" and you said "The great thing about vim is that it is a language", so you did the same.
Vim is a language != vim is a programming language. That should be obvious, and it differs emacs since emacs does not have the same notion on text editing that vim or vi does. Vim's language is far more sophisticated than memorizing shortcuts and calling macros, since you can even do that in ms-word. Vim's language follows a grammar of its own and by using it you are able to construct edits/macros/motions that would be impossible otherwise. @@hdbrot