DEV Community

Cover image for Why new programmers should be using Vim
jamesc40
jamesc40

Posted on

Why new programmers should be using Vim

At the beginning of my coding journey like most others one of my first steps was to download VSCode onto my computer.

It wasn't until a few months into learning how to code that I learned of a program that was already on my computer that completely changes the way you interact with a text editor.

That text editor is Vim and after seeing some of the benefits it could give to power users. I decided to give it a shot.

After the initial cobwebs wore off I found that after just a few days there were some tasks I was already faster at doing compared to in VSCode which although new was a UI I had been interacting with almost my whole life. The ability to jump to any point on the page with just a few key strokes felt like I was was Neo in The Matrix.

There are seven basic modes in vim but when first starting out I'd advice for you to just focus on these three

  • command mode (moving with the keyboard)
  • insert mode (typing in the text editor)
  • visual mode (used to selected characters ex. copy, paste, etc.

... and here are some key-binds to get you going

  • switch between command mode and insert mode with i
  • switch between insert mode and command mode with Esc
  • navigate up in command mode with k
  • navigate down in command mode with j
  • navigate left in command mode with h
  • navigate right in command mode with l
  • save with :w followed by enter
  • to quit without saving :q! or ZQ
  • undo with u
  • redo with Ctrl+r
  • to save AND quit :wq

In conclusion if you've been thinking of giving vim a try or this is your first time hearing about it just learning the basics can be beneficial and who knows you might just find that you prefer it!

Top comments (0)