3 ms·
I'm not trying to be contrarian here, but why would someone continue to use Vim and Emacs when all of its lovely features have been integrated into products lik
by cecida 6y ago
I'm not trying to be contrarian here, but why would someone continue to use Vim and Emacs when all of its lovely features have been integrated into products like VCode?
It just reminds me of serious men with beards working on mainframes and AIX power systems when I started my career.
- gen220 6y ago> all of its lovely features I think this might be only superficially true. One of the meta-features of vim/emacs is, over months and years of use, they slowly teach you how IDEs "work", and invite you to tweak how yours works to your whim. example: I notice a process is slow in vim. I'm able to profile the problem, identify the binary responsible, replace it with a faster equivalent program, and enjoy that improvement for the rest of my life. Such a thing may be possible in VS Code, but it's against the norm of "just install this plugin", whereas it is the norm in vim/emacs-world. Some other scattered ideas: I also think that, since vim and emacs are fundamentally cli tools also gives them an advantage, because you can hook them in to your terminal workflows (git add -p, git commit -v, etc). also, you can dispatch terminal commands seamlessly from inside vim (I get `make build` in two keystrokes: `,d`). vim (I can't speak for emacs, don't use it) is also more responsive with a much smaller resource footprint and an equivalent feature set. my work laptop can run a web browser and vim for 6+ hours. With vs code, maybe 3 hours.
- chestervonwinch 6y agoI don't think most people suggest vim as a replacement for an IDE. In fact, personally I use vim bindings in my IDE because I think I think it's an efficient way to edit text, whereas the IDE provides things vim is not good at (e.g., navigating large code bases by easily jumping to definitions, doing automated refactoring, etc.). However, there's also times when I don't have the luxury of using an IDE or when I just need to make quick edits to a single file. In these circumstances, I can just fire up vim and quickly do what I need to do because vim is ubiquitous and editing with it is efficient.
- flukus 6y agoVim is just one piece of the puzzle, it's the editor in the IDE that is unix. Tools like VSCode and IDE's take over too many responsibilities and usually do an inferior job. VSCode will do the window management for instance, opening new tabs for files, file list windows, terminal windows, etc. My desktop environment (dwm or tmux) is much better at this and universal for non development tasks as well. Another bug bear of mine (this one doesn't apply to VSCode) is IDEs that want to be the build system instead of my much more powerful Makefiles. Because it integrates so well into this environment it can be used as the editor step in other scripts/tools like how it is used in git commit messages. As a quick example of how this can be used here is a script I made for working with tab separated files: tmpout="$1.tmp" cat $1 | sed "s/\\t/~|/g" | column -t -s~ | \ vim -c 'set nowrap' - +"file $tmpout" if [[ -f $tmpout ]]; then <$tmpout sed "s/\\s*|\\s*/\\t/g" > $1 rm $tmpout fi In 7 lines of code I made it a half decent tsv editor in part of a larger system, replacing the million excel windows others were using.
- lalaithion 6y agoSure, I use VSCode and Intellij and all the beautiful modern IDEs. But I use them with Vim keybindings turned on. Because extremely common things that you do while programming are extremely quick for me to do with vim commands. ci" == delete everything within these quotes, and put me in insert mode. vi{:%s/old_var_name/new_var_name/g == rename a variable within a block qaI"<ESC>A",<ESC>jq == make a new macro to quote a line of text and add a comma at the end. Great for taking a bunch of strings I've copied from a text file and putting them into a list in code. But the point here is not this specific macro; I can do all sorts of minor text processing macros for the dumb thing I have to do, and not manually process 100 lines of text to turn it into a piece of json.
- jen729w 6y agoJust started doing this for RSI reasons. Not having to constantly reach down to those arrow keys is fabulous.
- test1235 6y agoThat's funny - I'd have thought using arrow keys would help prevent RSI 'cos you're having to move your whole arm out of a static position. (Or maybe you don't? Do you just twist your wrist in an awkward position?)
- BeetleB 6y agoCan I make a TODO link to a piece of code and have VSCode email it to me periodically? When viewing a particular function, can I have a link to the actual email discussing this feature in a comment, and have VSCode open up the relevant email?
- 7786655 6y agoWith enough plugins, Vim can do everything VSCode can. But using a Vim-emulator in a different editor will always be an "uncanny valley" experience. Also on my system VSCodeVim is so slow it frequently lags behind me while typing.
- woldemariam 6y agoCan you please provide examples (or a link) that shows Vim integrated into VSCode?
- 49531 6y agoI think they're referencing vim emulator plugins for VSCode: https://github.com/VSCodeVim/Vim https://github.com/VSCodeVim/Vim
- OpossumMinister 6y agoYou might be able to get the modal editing of Vim into other editors and IDEs, but you'll never get ability to modify your editor as if it's just another program (while it's running!), which is the main power of Emacs.
- 49531 6y agoA couple good reasons I can think of off the top of my head is that vim is easy to get up and running in headless environments, even with all of the bells and whistles of a modern text editor or IDE. Another reason is that I really enjoy that vim runs in my terminal. I can easily toggle in and out of vim while doing heavy terminal work, and if I want to rapidly open and close different files while looking around for things vim makes it simple. There might be an aesthetic or comfort aspect to it, but most tools don't stay as relevant as vim has for mere style points.