Eg. OrgMode, Magit, Helm, Tramp, Dired and slime to mention a few. Its a lifestyle ;-)
it's an up-front cost, but it's one that you'll benefit a lot from over the years.
I recommend starting with soft plaintext, like a diary. Over time, you can migrate to using it to edit code. My conversion took a couple months, and followed this pattern.
I started by editing plaintext diary files. Then, once I was very use to the in-file navigation, I installed vim-mode on my editor of choice at the time, so I could benefit from efficiencies there, while keeping all the IDE benefits.
Then, I began the process of replicating all of the features I used in my IDE, in vim. that took maybe another month, and was motivated by how painfully un-snappy my IDE was relative to vim.
This is all to say, it doesn't have to be an all-or-nothing cutover. That would be painful and frustrating.
While I love Vim and I use it most of the time, I don't really buy it when people act like it saved them a whole lot of time. I love the Vim keystrokes and philosophy, but I don't really know if I'm any more productive with Vim than I was with Emacs...I stick with Vim because I find that, once you "get it", it's relatively easy to translate stuff from your brain to the screen.
I wish most of my time was spent writing code, but a vast majority is spent reading it and swearing at my monitor because things don't work, so I don't think even a perfect editor would make me a lot more productive, at least not directly, except (as you stated) maybe through me liking the editor a bit more.
I personally spend as much time as I can in the terminal, and so my "IDE" is actually is typically NeoVim, tmux, some kind of language-server, and a command line. Am I more productive than my peers using IntelliJ because of this setup? Almost certainly not, but I find it very intuitive for me to do stuff with, since I'm super familiar with the tmux keystrokes, and I find Vim's design really intuitive for me.
Really if it weren't for the first challenge of learning Vim, I wouldn't have learned to program. Which, I know, sounds kind of backwards :P
Can you expand more on what you mean by that? It's never really clicked with me what the exact value prop of vim is.
Millions actually.
I'm an emacs user (who does not want to get into an editor war, mmkay). The plugins are so useful. I'm just learning magit and it very much takes most of the evil and hostility out of Git and I really like it. I also have dired (a sophisticated directory editor), and about to learn loads more such as Bookmark+ which allows links and jumps to anything you set, and allows you to save your desktop layout and files.
Emacs has so much, if only you can find it (align-regexp is very useful but there is so much more). Edit: look up M-x occurs if you haven't met it. Mega useful.
Consistency is going to be lost as you add functionality. If Vim doesn't have that problem it will in time.
Emacs isn't perfect, the package library melpa has dubious quality software, but emacs really is very good indeed.
I don't think it does as much as you might think.
Can you give an example? I have heard this but I have difficulty understanding exactly what I could do in Vim that I couldn't do in Sublime Text for example
Even then, macros kind of have to be keyboard based, as the keyboard presents a straight forward serialization format. Similar to how macros in non-Lisp languages struggle to achieve an elegance you can't quite capture unless your language is literally a textual AST
But there's also the random things because there's so much. Like ~ to swap case, or Ctrl-A/O for increment/decrement. I find myself in non-vim editors typing "dd" all too often
Shift+y
3
j
p
3
>>
time yourself doing the same thing in sublime.
The general form of a vim command is:
(repeat)(verb)(motion/object)
That is, I want to perform 'verb' 'repeat' times on a 'motion' or 'object'. Examples:
fX == 'f'ind the next occurrence of character 'X'
3fX == repeat 'fX' 3 times
w == go to the next word on the line
3w == repeat 'w' 3 times, i.e. go 3 words right
dw == delete word
3dw == delete 3 words
dfs == delete to the next occurrence of 's'
yw == "yank" (copy to the buffer) the next word
y3w == yank the next 3 words to the buffer
H, M, L == move the cursor to the top, middle, or bottom of the screen
zz == center the current line of text in the editor window.
8j == move the cursor 8 lines down
ma == create a bookmark 'a'
`a == go to bookmark 'a'
"ay == yank to buffer 'a'
"ap == paste buffer 'a'
. == repeat the last editing command (insert, delete, yank...)
I like vim because its commands are both efficient and precise. I don't need to look and make sure the cursor is at the right position or that I've selected what I want to cut/copy correctly. I know it's correct because I typed it in. And I don't need to move my hand to the mouse or arrow keys. And bookmarks and buffers are great.I did this because:
1 - I got deeply interested in Lisp and Scheme, and Emacs was reputed to have the best editing environment for these languages
2 - Almost all of Emacs itself and Emacs' entire package ecosystem is written in eLisp, which is a tremendous improvement over vimscript, in which almost all vim packages are written. I'd just rather read and write eLisp over vimscript any day.[1]
3 - Emacs offers so much more than vim (or neovim). You read and write your email in Emacs, surf the web in Emacs, chat on IRC in Emacs, have deep shell integration in Emacs[2], read RSS news in Emacs, use org-mode (which vim only has pale imitations of) and do just about everything else you'd ever want in it, which is not really the goal of vim, and certainly the opposite of the minimalism of vi.
4 - Emacs had packages that would emulate vim (evil-mode being by far the best and most complete of them all), which would allow me to bring my decades of vim knowledge and plugins over to Emacs, so I'd feel right at home.
The switch was a success, and I've been using Emacs for about 10 years now. I have no reason to go back, as Emacs does virtually everything vim does and much more than vim doesn't.
There are still a few things I miss from vim, and I still fire it up on systems where Emacs is not installed and where I don't have my Emacs config (I don't like using Emacs' TRAMP mode, for reasons I won't go in to here), and for a few tasks where Emacs just isn't adequate.
For instance for editing files with really long lines or gigantic files which Emacs just chokes on.[3] vim's regex engine also has some features Emacs lacks (ie. vim's \zs and \ze zero-width patterns are ones I sorely miss in Emacs).
Otherwise, though, evil is a pretty feature-complete emulation of vim, and I don't find myself missing the latter much.
It did take me a really, really long time to get my Emacs configured to be the way I liked it, though.. and that's a never-ending process.
So I wouldn't necessarily recommend that other vim veterans switch to Emacs unless they've got a huge amount of time on their hands, love tinkering with their configs, and either already love or are open to learning to love Lisp. I happen to be one of those people, so it's worked well for me.
[1] - Yes, it's possible to write vim packages in Guile Scheme, but virtually no one does this. A Guile Scheme ecosystem doesn't exist for vim, so if I chose to write Guilde Scheme packages for vim, I'd pretty much be the only one doing it. Not so in Emacs, where everyone writes packages in eLisp.
[2] - Emacs' shell integration didn't turn out as great as I expected, as it's vulnerable to Emacs' atrocious handling of long lines, slowness, and buggyness of its shell modes (though libvterm is supposed to offer a real shell inside Emacs, which is reputed to be a lot better than other shell modes written in eLisp, but I haven't tried it).
[3] - vim also isn't great at files with super long lines and gigantic files, but it's better than Emacs.
I could not give up running shells in an emacs shell window, capturing all the output as normal text I can edit and search with the full power of emacs, instead of a dumb scrolling terminal emulator, and the ability to make keyboard macros that hop between text files and dired directory listings and shell windows, copying file names and data to fire off sequences of shell commands. Easy on-the-fly automation of repetitive tasks. Why write a single use shell script when you can just do it once by hand while recording a keyboard macro, then repeat it thousands of times.
Emacs would freeze on me when this happens.
Is there a way around this apart from running a shell under libvterm? Or is this even still an issue under libvterm too?
Long lines are a more general issue with Emacs, but there's changes in Emacs 27 that should mostly solve it.
The fact that it can happen and does happen leads me to avoid Emacs' shell modes altogether. I just don't want my Emacs freezing on me ever. Considering how much I do in it, it freezing on me is an utter and complete disaster that I want to completely avoid even if it doesn't happen often.
"there's changes in Emacs 27 that should mostly solve it"
If you're talking about the solong mode integration, that's just a hack that kind of works for static buffers, but won't help in dynamic buffers like shell-mode.
To really and truly fix this issue, a core part of Emacs will have to be rewritten, and since that part is written in C and is pretty hairy, no one seems to want to deal with it. So it probably won't happen any time soon.
I'm just hoping Emacs' libvterm integration provides a good workaround, at least for using a shell from within Emacs. I'll have to give it a try one of these days.
It's terribly inefficient for emacs vi emulation mode to actually quit emacs when you type ":q", because it takes much longer for emacs to start up than vi, and people use a long-running emacs a lot differently than they use disposable vi's.
UniPress Emacs's vi emulation mode would actually flip you over to an emacs shell buffer when you typed :q, and the shell would recognize when you typed "vi foo.c" and flip back over to a vi emulator buffer instead of actually running vi, but INSTANTLY, since changing buffers in a running emacs was much faster than actually starting up a new vi process.
So die-hard vi users didn't have to re-learn their muscle memory, and could just stay in the same emacs all the time, while the same old emacs alternately flipped between pretending to be a shell, and pretending to be vi.
This is false on pretty much any modern system. They start up in about the same amount of time. Using lots of packages (in both vim and Emacs) will slow down startup speed, but there are tricks to speed that up too (like by defering actual loading of them until they're needed).
Also, most people who run Emacs just keep it running all the time, and almost never quit or restart it, so startup speed would not be an issue even if it was slow, which it isn't.
"people use a long-running emacs a lot differently than they use disposable vi's"
Emacs has an emacs-client binary which you can use exactly the way you use a disposable vi (or vim). It'll connect to the long-running Emacs process in the background, but that's an implementation detail that you as an Emacs user wouldn't have to worry about, apart from starting Emacs once when you boot your system.
Regarding your description of shell-flipping, Emacs does offer shell integration, where that sort of thing can be done, but I personally don't use it and run shells outside of Emacs (and run both my shells and Emacs itself under tmux), so my workflow with Emacs and the shell mirrors the traditional vi/vim workflow.
I didn't have to change my decades-old vim muscle memory or workflow when I made the switch to Emacs.
alias vi='emacsclient -t -a ""'
Then whenever you run 'vi' it will create a new frame on an Emacs instance that's running as a server[1]. If there's not an Emacs server already running, then it will start one for you, so the first invocation will be slow, but every subsequent invocation will be fast. No need to change your muscle memory for this particular case.[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Em...
Then maybe you can help:) I've tried, multiple times, to switch to emacs. And every time, I get stuck, because vim keybindings are so wired in to my muscle memory now, and even the broader interactions are hard to adopt (i.e., I expect to get a command prompt by escaping to command mode and then typing ":", and then all commands are available). Is there any trick that you found helpful to overcome all the inertia?
I have run in to some of those corner cases myself, and had to ask myself whether they were worth giving up Emacs and evil for, and the answer for me that was that they weren't. Both are way too useful for me, and an occasional hiccup here and there isn't worth giving them up and going back to vim.
Also, I don't run in to those corner cases very often. Maybe 95% percent or more of the vim commands and features I use myself are completely emulated by evil without issues.
One other thing to ask yourself when running in to such cases is whether they're really an incompleteness in evil's vim emulation or maybe just a lack of a keybinding or some function that you could easily write yourself (if you know eLisp).
It's taken some elbow grease, but I've ironed out a lot of the wrinkles such as missing vim-like keybindings in modes that don't come with them by default (others use spacemacs or doom for this).
I was tempted to say "just use evil-mode", but it's really not "just" a matter of using it. evil-mode doesn't get you everything, as many Emacs modes just don't have vim-like bindings, and you'll either need to rebind them all yourself to something that makes sense for you (which is what I did, and I recommend creating lots of hydras to help you remember everything that's available), or you can use something like Spacemacs or Doom which will set up sane defaults for a lot of modes.
I've never used Spacemacs or Doom myself, but I've heard good things about both.. and bad things about Spacemacs, and how Doom is supposed to be an improvement on Spacemacs.. but as I've not used either I can't really comment on how accurate those claims are. I'd suggest doing your own research on those, or maybe someone here can comment on them.
Also, I'd recommend joining #evil-mode on the Frenode IRC network, the Emacs subreddit, and the Emacs StackExchange. You can get all of your questions answered there, and learn a ton about Emacs by reading these.
Perhaps I should take another swing at it and see if I can't deal with the quirks...
Then, you can slowly try to switch one thing at a time, for example start editing all Dockerfiles in spacemacs, or maybe do that one hello-world project/app in clojure/phoenix using spacemacs. See how you like it, tweak it a bit.
Finally, decide on using it as a daily driver for a new project and stick with it. It will grow on you.