> As someone who has only experience with vim and not Emacs, are there any advantages to Emacs or is it just „different“?
As someone who uses both, there are clear advantages to each one. A Vim power-user spending time learning Emacs will not be wasting their time (and vice-versa, of course).
IMO, Vim is slightly faster to use when you want to navigate the file, making changes as you go, while Emacs is slightly better at programmatically automating common tasks.
> I hear this a lot, can you give some concrete examples?
You can get a good example of what is possible by using org mode for a little while.
For example, keystroke <TAB> on an issue marked as TODO moves it to the next state IN-PROGRESS, <TAB> again moves it to the next state DONE and changes the color from red to green, and if you continue <TAB>ing you will cycle through all states.
That's the default 3 states.
If you don't like the default states, at the top of your file you can simply list the state progression in plain text like this:
#+TODO: TODO INVESTIGATING IN-PROGESS BLOCKED | DONE
And now your <TAB>ing will cycle through those states.
Another example of the programmability of Emacs is when editing tables in org mode - it's so painless and intuitive to have text tables with columns all aligned as you move to the next column or row. That's also behaviour that is not hardwired into Emacs, it's simply some sort of hook that's registered when org mode is set up.
As a final example, here's a snippet from my .emacs file:
; Set the postamble for org html export
; %t stands for the title.
; %a stands for the author's name.
; %e stands for the author's email.
; %d stands for the date.
; %c will be replaced by `org-html-creator-string'.
; %v will be replaced by `org-html-validation-link'.
; %T will be replaced by the export time.
; %C will be replaced by the last modification time.
Those are callbacks - you don't get any more programmability than telling the application "call me back when the user requests an export, but only for HTML use these functions".
> I am really curious to know how Emacs and Vim fits in your daily workflow?
I use Vim primarily for writing code and code navigation. I use Emacs primarily for writing text and text navigation (for example, Emacs shortcuts for paragraph formatting and navigation are great (C-u M-q)). Emacs org mode is also great for maintaining tasklists, time-spent on tasks (it calculates that for you using a date-picker), reorganising the task hierarchy, etc.
Vim, even with plugins, doesn't come close to org mode.
I have heard many good things about org-mode.
Question:
- Have you ever used Vimwiki? I know it is no org-mode, but even I am a regular notetaker and I never felt it really lacked in anything, but yeah, it doesn't have task planning.
Well, Emacs is incredibly powerful, but it is just too much work to do anything, even regarding keystrokes and all the chords you have to remember. I have worked on Emacs too, but sometimes it is just not worth investing so much time and energy in Emacs if you can spend much fewer time in Vim and get a lot more done.
VimScript is aweful, sure, but with Neovim Lua support, you can do a lot more in a decent and fast language. Emacs has some great plugins and good LSP support (Also, available in Neovim/Vim and also native treesitter support too). There is barely anything in Emacs at this moment that really justifies investing so much time into it.
Even with this post, as an experienced Vimmer, I could basically do everything they are doing here, without installing any plugin and remembering all those obscure keystrokes.
Also, Emacs folks downvoting this, tell me if my logic is wrong, you will come up with NADA.
> Even with this post, as an experienced Vimmer, I could basically do everything they are doing here, without installing any plugin and remembering all those obscure keystrokes.
I thought so too[1], but I am willing to give the blog author the benefit of the doubt (that Avy is the fastest way). It also seems to me that with Avy the process is a little more uniform and consistent than the way I would do it in Vim (only a little, though).
[1] In Vim, I would do the Filter->Select->Act cycle as *'/<pattern>qq<modify-pattern><esc>q'* and then use 'n@q' for each modification, or 'nn' to skip to the next modification.
For simple patterns (for example, adding a parameter to a function call) I won't even bother with the recording, I'll do a flurry of 'n.' or 'nn'.
As someone who uses both, there are clear advantages to each one. A Vim power-user spending time learning Emacs will not be wasting their time (and vice-versa, of course).
IMO, Vim is slightly faster to use when you want to navigate the file, making changes as you go, while Emacs is slightly better at programmatically automating common tasks.