Every Developer Should Learn Vim (And How to Start Today)
Three Great Benefits of Vim
- Reduced mouse dependency: Constantly reaching for your mouse disrupts workflow and ergonomics.
- Efficient editing: Vim provides powerful movement and editing commands.
- Fun factor: Using Vim can make coding feel more interactive and enjoyable, almost like playing a game.
How to learn Vim effectively?
Start with Vim Extensions
Before diving into an IDE like Vim or Neovim directly, start by using Vim extensions in your favorite code editor (VSCode, JetBrains, Sublime Text, etc.). This way, you can get comfortable with editing using Vim without the additional overhead of the editor specific behaviour/keybinds.

Once you feel comfortable with the basics, transitioning to dedicated Vim editors like Neovim will be much smoother.
Getting Started: Keeping it Simple
If you are completely new to Vim, keep it simple initially. You only need to grasp a few basic commands:
<esc>
to return to normal mode.i
to insert text.h
,j
,k
,l
to move your cursor left, down, up, and right respectively.
Spend a few minutes just navigating and typing to build initial comfort. Don’t spend too much time here, just enough to get used to Vim.
Cursor Movement: Ditch the Mouse
Moving the cursor efficiently without reaching for your mouse is a significant Vim advantage. Here’s how to do it:
Replacing Click Navigation
Instead of clicking to navigate, use /
to search for text. If you know where you want to go, simply type /
followed by the text.
Press n
to jump to the next occurrence forwards or N
to go to the previous occurrence backwards.
?
is the same as /
, but it starts the search going upwards/backwards.
Example:
- Mouse: “I want to edit the
const
declaration. Click.” - Vim: Type
/const
and hit Enter.
Replacing Scrolling
Using /
to navigate is better than scrolling, but what if you don’t see where you want to navigate and don’t know what to look for? There are several alternatives in Vim.
Ctrl-d
andCtrl-u
: Scroll half-page down or up. This is the most direct scrolling translation in Vim.{
and}
: Jump quickly between paragraphs or blank lines. These are ergonomically preferable for many users.- Using the mouse is acceptable, I still sometimes use the mouse scroll wheel to read files.
Quick Selections and Editing
You may also use the mouse to highlight and copy or delete large blocks of text. Vim offers significantly better alternatives like:
dd
to delete a whole line, keeping you in “normal mode”.cc
to delete a whole line, putting you into “insert mode”.yy
to copy (yank) a line.- Many more ways using numerical counts and “text objects” along with those
d
,c
, andy
(p
is used to paste what is yanked/copied)
Efficient Editing: Vim’s True Power
Editing efficiently is Vim’s core strength. As you progress, you’ll learn commands that enhance your editing speed and precision significantly. Each new command you learn becomes another tool at your disposal, enriching your coding experience.
For a jump start in learning Vim commands, take a look at my Vim Tier List post/video to know what commands you should learn and what commands can be skipped.
There is plenty of other resources:
- Vim Tutor
vimtutor
: https://vimschool.netlify.app/introduction/vimtutor/ - Vim Cheat Sheet: https://vim.rtorr.com/
Enjoying the Journey
Vim transforms the coding experience from a mundane task into an engaging activity. It adds a gaming-like layer to coding, making each editing session feel interactive and dynamic. Embrace this aspect by exploring commands based on real-world needs:
- Think: “I wish Vim could do this…” or “How can I do this better?”
- Then find an answer by searching online, looking at documentation, or asking ChatGPT.
Final Thoughts:
Ultimately, the key to learning Vim successfully is enjoying the process. Keep your curiosity alive, explore Vim’s capabilities, and gradually integrate new commands into your workflow. Have fun coding!