My take on Neovim vs Emacs vs VS Code
My journey with Neovim, Emacs, and VS Code: A personal exploration and comparison of three legendary text editors
Why?
I've been a VS Code user since its release back in 2015. I've worked as a web developer for most of this time, primarily using React and Angular. I also tried other editors, such as Atom and Sublime Text, as well as WebStorm IDE from JetBrains.
I started exploring Vim somewhere around 2020. Shortly after, I found out about Neovim, which was more modern, using Lua as a scripting language instead of proprietary Vimscript. Since then, I started exploring other editors like Emacs and revisiting VS Code multiple times with my new perspective.
There are many comparisons out there, but very rarely do they highlight what seems important to me. So, in this article, I plan to give you my take on these editors.
Visual Studio Code
Made and maintained by Microsoft, which is both a huge benefit and a drawback. VS Code was my first editor among three, and Here are some of the key aspects of this editor that I value:
Reliablity - this doesn't seem like a big deal, but in comparison to Neovim or Emacs, where a single misstep in configuration makes the editor unusable, VS Code is always my fallback tool.
User-friendliness - VS Code features modern UI, which is way more intuitive and has a better user experience than Neovim or Emacs, especially for beginners.
Packed with features - the editor supports all mainstream programming languages, including compilation and debugging. It also has plugins for various test runners, linters, and formatters, features excellent integration with GitHub Copilot, and solid Git integration.
Despite all of the mentioned pros, VS Code comes with its drawbacks:
Resource consumption - compared to alternatives, VS Code requires significantly more resources, primarily due to its Electron nature. Additionally, it includes numerous features that some users may never need.
Telemetry - by default, VS Code sends usage metrics to Microsoft, which might raise privacy concerns for some users.
Limited customization - although VS Code offers a decent amount of customization, it doesn't quite measure up to Neovim or Emacs. The capabilities of UI extensions are intentionally limited, and the documentation might not be as thorough in comparison.
Neovim
Neovim is a modern fork of more than 30 years old famous Vim editor. It started by adding asynchronous capabilities but ultimately introduced Lua as a scripting language, native support for LSP (Language server protocol), and Tree-sitter, which allows it to look and behave like a modern editor. Neovim is primarily important to me because of its:
First-class modal editing - core feature, inherited from Vim's predecessor Vi, is hard to live without once you learn it. I now use Vim editing mode in every environment possible.
Speed - Neovim's performance optimizations and lightweight design make it a fast and efficient editor, allowing for smooth workflow integration with other CLI tools.
Extensibility - it's very simple to shape up to your needs, including all necessary features such as code completion or debugging, thanks to its LSP and DAP support. You can fuzzy search through everything thanks to packages like Telescope or fzf. The best part is that you can go beyond existing package capabilities and write your commands or features. You can check out a great example in my other post:
However, to be fair, I should mention its cons:
Learning curve - the modal editing system and terminal UI require memorizing numerous keybindings, which can be intimidating for beginners and demand a significant investment of time and effort to master.
Plugin reliance - while Neovim's extensibility is one of its strengths, it relies heavily on plugins for advanced features. This can lead to additional setup and configuration time, so be prepared to spend evenings researching new packages and refining your configuration.
Vim's legacy - while developers are making a great effort to provide all necessary API in Lua, Neovim still supports Vimscript and retains many legacy features from Vim. This often confuses, and sometimes not-so-perfect documentation doesn't help to overcome it.
To sum it up, Neovim is a remarkable tool that provides developers with excellent opportunities for enhancing their work. Its modal editing, rapid performance, and exceptional expandability make it an outstanding choice. However, it's important to note some challenges to using Neovim, such as the demanding learning process and reliance on plugins.
Emacs
GNU Emacs is an exceptional editor that some refer to as an operating system, thanks to its numerous noteworthy packages such as Org-mode (for organizing information), Magit (git client), Mu4e (email client) or evil-mode (vim emulation layer). I tried emacs, specifically doom-emacs, for a few months, and here are my main pros for it:
Self-documenting - emacs is designed so that every variable or function has some documentation and, by design, is searchable through completion UI. That means your code is your documentation.
Elisp - I wonder if I would ever have a chance otherwise to put my hands on such a unique language. It was exciting to explore and taught me a lot.
Extensibility - Emacs is the best among the three, mainly because it's an Elisp interpreter in the first place, with editing functionality added on top.
Although, I can note such cons:
Slow - as a macOS user, I experienced font rendering speed issues that made it unappealing. Additionally, its synchronous nature often causes performance drops, which can be frustrating.
Modern features - when compared to Neovim or VS Code, emacs support for LSP needs to be improved. Tree-sitter was merged into the currently unreleased version, but the supported language list is minimal.
Long development cycle - Emacs 27 was released in 2020, and version 26 in 2016. That is a period where excellent tools like LSP or Tree-gained popularity. Third-party packages adopted them, but implementation is far from perfect compared to native support in Neovim or VS Code.
I found myself constantly returning to Neovim or VS Code due to the lack of support for cutting-edge community tools. While Emacs is appealing to me as an idea, its performance issues prevent me from making it my primary editor.
Conclusion
The choice of editor ultimately depends on personal preference. However, I strongly advise against trying out (neo)Vim or Emacs as your first editor and suggest going with VS Code instead. On the other hand, if you're interested in experimenting with your development environment, it's worth looking at these alternatives. Then, with some time and effort, like an artist, you'll develop your own set of tools that will enhance your creativity!