Ah, yes, Vim, the powerful text-editor that is everywhere and a place where even the wisest can’t quit. You had to hear about it at least once. Or you might have considered learning or trying it. But why do it now? It’s 2020, doesn’t everyone use VSCode already? Let’s dive in and figure why someone would still learn Vim.

From Mode to Mode

What Vim is excellent at is navigating, making some changes, and repeating the process. The process most call editing (not to be confused with writing). Most developers tend to overlook this fact, but this is one of the strong selling points of Vim. Developers are more prone to reading code, jumping from file to file, making small incisions in the code, and not just writing it all the time.

Most of the editors work in one mode. You don’t explicitly switch from one to another. For example, you might jump to a file, then select some lines, edit or copy some of them while being in the “same” mode. Vim is different, and it strongly differentiates modes. Maybe this is why most people get stuck in it from time to time.

Vim achieves all of this because it supports different modes:

  • NORMAL mode

How to get there? Press Esc key in any mode.

What is it about? Swiftly navigate through code and enter any of the modes below.

  • INSERT mode

How to get there? Press i (insert), a (append), or other keys from the Normal mode.

What is it about? Change and insert characters, similar to most editors nowadays.

  • VISUAL mode

How to get there? Press vV, or <Ctrl-V> or other keys from the Normal mode.

What is it about? Highlight areas of text, indent large pieces of code,

  • COMMAND-LINE mode

How to get there? Starts by typing : in Normal or Visual mode

What is it about? A door to a Vim and outside world

There are other modes, a total of 12 of them. Six of them are a variation of other 6, but I won’t get into details about them here. You can read them here.

But Should I Care About Modes?

I’d say you shouldn’t care about all six modes and their variants, the essential thing as someone who is figuring out whether to use Vim in 2020 is the NORMAL and INSERT mode. As your needs grow stronger, you will explore other possibilities.

#programming #culture #vim #editor

Why Should You Learn Vim in 2020
2.65 GEEK