DEV Community

Cover image for What is Vim?
Patrick Henry
Patrick Henry

Posted on

What is Vim?

What is Vim?

Vim, short for "Vi Improved," and created by Bram Moolenaar is an amazing stand-out tool in the world of command-line editors. Vim contains features such as syntax highlighting and support for plugins and is also widely available on most UNIX-based systems, Vim represents a great choice for developers seeking a powerful editing environment. In the lineup of obscure and comparatively hard-to-use command-line editors(Nano, Helix, Vim), Vim is more well-known than the rest.

Why Vim?

Vim is a tool renowned for its efficiency, speed, and mastery of keyboard shortcuts. Operating as a modal editor(insert, normal, visual). This means that Vim has different modes where you have different keyboard shortcuts based on what mode you are in. Normal mode allows you to traverse the text quicker than any other method allowing you to use [j, k, l,;, w, e, b, t, f, ...etc] as means to traverse your code, allowing your hands to stay on the home row and at the ready to enter insert mode. Insert mode tends to be the most recognizable mode to new Vim users as it has any features a normal text editor like VsCode would have allowing you to enter text. Visual mode is the last mode that Vim has that allows the user to highlight text swiftly and copy and paste with [y, c, p, ...etc] to be able to insert and take code out fast without having to use the mouse which can feel very clunky, especially for those who can touch type, which most developers can. However, its setup requires a hands-on approach, with users needing to manually install and configure plugins, in contrast to more user-friendly alternatives like VSCode.


Community and Plugins

Core Plugins

NeoVim ships with a selection of core plugins, providing essential features right out of the box. From text editing utilities to version control integration, these core plugins enhance Vim's functionality and usability, laying a solid foundation for users to build upon and customize. While Vim comes out of the box with plenty of plugins out of the box that can be configured, you would be foolish to think that you could hop into Vim and be right at home. Vim is known to have a steep learning curve not only because of the shortcuts, and not knowing how to leave Vim but also because YOU HAVE TO CODE YOUR EDITOR, meaning that you have to make sure that all of your plugins work and play well together, use a plugin manager and figure out how to install it. Expert Vimmers sometimes spend hours and days configuring and reconfiguring their setup and even re-iterating it consistently. While this may seem like a hassle it provides a unique opportunity to create a PDE. A term that means that you can feel at home in your editor.

Creating a Personalized Development Environment (PDE)

One of NeoVim's strengths lies in its vibrant community and extensive ecosystem of plugins and tools. This community fosters collaboration and empowers users to create personalized development environments created for unique workflows and requirements. This allows every Vimmer to have their take on their setup and allows them to code at the speed of thought. This is only possible because Vimmer's put an incredible amount of thought into their setup.
Things like:

  • Should I use XYZ as a command for the x plugin
  • Do I need this plugin
  • Will this plugin slow down my Vim startup
  • and many other nuanced topics.

This may feel trivial for many and make you wonder why, but every user has their reasons. Some say that it can make coding feel like a game and they have to find the most efficient way at the moment to traverse the code base. It allows them to have a setup that works for them. Whatever the reason. It's up to the Vimmer themselves and no one can force anything upon them. Vim has even been so popular that a new Vim has popped up in recent years called Neovim which has even more features out of the box while staying true to its roots of DIY.


NeoVim

Differences with Vim

NeoVim emerges as a modernized fork of Vim, introducing several key improvements over its predecessor:

  • Enhanced Stability and Performance:
    • NeoVim provides stability and offers a smooth editing experience.
  • Asynchronous Plugin Support:
    • NeoVim supports asynchronous plugins, enabling faster and a responsive editing workflow.
  • Improved Terminal Integrations and UI:
    • NeoVim provides better terminal integrations creating a better command-line environment.
  • Native Debugging Capabilities:
    • One notable feature absent in Vim but present in NeoVim is native debugging, facilitating easier troubleshooting and code inspection.
  • Lua Integration:
    • NeoVim embraces Lua as a scripting language, empowering users to customize and extend their editing environment with greater flexibility and ease.

Lua Integration

NeoVim's integration of Lua opens up new possibilities for users, allowing for sophisticated customization far beyond what was previously available with Vim's VimScript. Neovim's allowance of using a well-known and actual programming language, instead of a bespoke and thrown-together scripting language just increased Neovim's capabilities ten-fold. With Lua's expressive syntax and powerful features, users can tailor NeoVim to suit their specific needs and preferences, further enhancing productivity and workflow efficiency.


In summary, while Vim remains a great choice for command-line editing with its speed and efficiency, NeoVim excels at being a competent alternative while still keeping Vim's core functionality and soul alive, offering a vast plugin ecosystem. Vim's customizability whether you choose Vim's simplicity or NeoVim's advanced features, both editors provide powerful tools to streamline your workflow. Vim is a recommended choice for any developer. If you don't want to take a deep dive into the Vim world(it's quite a deep hole) consider using Vim motions in your favorite editor all of the most common editors have them and they can all elevate your coding experience. There are plenty of resources to get started using Vim motions and eventually take the plunge if you ever want to go to the dark side I would suggest looking at the resources.

Top comments (0)