Today I came across a blog post by Fotis Gimiam titled Selecting a Solid Code Editor in 2018. It was a thoughtful comparison of 4 popular code editors: Atom, VS Code, JetBrains’ IDEs, and Sublime. I was reading through the feature support table and thought to myself, hey, Vim/Neovim can do all these fancy things too! So, let’s add Vim to the feature matrix. (See Fotis’ blog post for comparison of the other editors.)
√ | feature exists in core editor √√ | feature supported by plugins ! | feature partially exists x | doesn't exist
|* Multiple Cursors||√√1|
|* Join Lines||√|
|* Duplicate Lines||√|
|* Moving Lines||√|
|* Changing Case||√|
|* Commenting Lines||√√|
|* Line Endings||√|
|* Indentation Settings||√|
|Editing & IDE Features||Vim|
|* Autocomplete (vars)||√|
|* Code Folding||√|
|* Spell Checking||√|
|* Language Support||√|
|* Autocomplete (IDE)||√|
|* Project View||√√|
|* File Tabs & Switching||√|
|* Split Editing||√|
|* Command Palette||x|
|* Indent Guides||√√|
|* Git Change Indicator||√√|
|* Terminal Integration||√|
|* CSS Colours||√√|
|* Scratch Pads||√√|
So pretty much everything on the table gets a tick. Go Vim!
So the blog post I was reading lists weaknesses in the editors the author was looking at. Addressed from a Vim perspective below:
Appearance [neutral]: Vim is a terminal application and thus can integrate perfectly with your terminal setup. There is also GVim (vim gui), and Neovim enables many third party gui apps that integrate the core editor, such as neovim-qt. The downside (if you are used to gui programs) is that a command line look/feel is unavoidable.
Refactoring [weakness]: Not supported in core vim, but there are plenty of plugins to provide limited refactoring support. Notable examples include jedi-vim for python refactoring, and plugins that integrate language server protocol. Refactoring support is lacking compared to the powerful IntelliSense built into JetBrains IDEs. So yes, this is a weakness in vim and current plugins.
Command Palette [neutral]: Not in Vim. Not really needed because everything is just a command/keybinding away anyway. Unfortunately it means some commands are less discoverable though.
Terminal Integration [strength]: Vim 8 and Neovim both support terminal buffers. Personally, I use vim in the terminal and find it neater to use tmux for terminal window management (vim-in-terminal instead of terminal-in-vim).
CSS Colours [strength]: vim-css-color highlights css colours for you. There are also other plugins that reportedly provide colour picking functionality and such.
Performance [strength]: Vanilla Vim is lightning fast (~6ms startup). Even my bloated Neovim setup with heaps of plugins takes less than half a second to startup ready to edit a file. This has always been the major point putting me off Atom and VS Code: I shouldn’t have to wait for a web browser engine to load so that I can edit a file.
Scratch Pads [strength]: Depending on what you are after, this is supported in vanilla vim
tempname(), and a short script), or there are plugins that
perform various scratch pad tasks.
Cost [strength]: Free and open source. :tada: That said, you can always
:help uganda) or sponsor neovim development on
The bottom line is, while there are all these new shiny editors, don’t forget to consider Vim/Neovim among your selection. They compare very favourably feature-wise, and well worth the investment in learning.
I never really understood the purpose of a minimap, apart from the fact that it looks cool. I prefer a simple widget in the status bar that shows current line number, total lines in the file, and percent of the way through the file for when I feel the need to see where I am in a large file. ↩
not natively, but relies on the terminal emulator’s zoom support. Some vim/neovim GUIs may support zooming natively. ↩