Why is Vim called a super notepad?

In this blog post, we will introduce the amazing efficiency and features of Vim, the ultimate text editor, and explain why it is called a “super notepad.”

 

Vim is a text editor that belongs to the same type as the Windows Notepad that people are familiar with. Vim’s text editing efficiency is so high that it can be called a “super notepad.” Vim is primarily used for editing computer program code but is also widely applied to editing other types of text, such as general documents and data files. For anyone who frequently edits text, not having tried Vim is a real missed opportunity.
When compared to Notepad, Vim’s biggest advantage is that you can complete all complex editing tasks quickly and easily without ever moving your hands from the middle section of the keyboard. When editing text in Notepad, you have to type in the middle section of the keyboard, move the cursor using the arrow keys, and perform complex tasks like copy-and-paste using the mouse. Moving your right hand between the center of the keyboard, the arrow keys, and the mouse wastes time and disrupts the flow of work, making the experience unpleasant. However, with Vim, you can complete all complex editing tasks using only the middle section of the keyboard.
For example, to move the cursor, you would typically use the arrow keys or the mouse, but in Vim, pressing “j” (or “k”) moves the cursor down (or up), and pressing ‘h’ (or “l”) moves the cursor left (or right). By using the four keys “h,” “j,” “k,” and “l” located directly below your right hand to move the cursor, you can completely avoid the inconvenience of reaching for the arrow keys. Additionally, pressing ‘w’ moves the cursor to the next word, and pressing “b” moves it to the previous word. Similarly, you can instantly move the cursor to the next paragraph, previous paragraph, first or last character within a line, top or bottom of the screen, or any position, without needing a mouse, keeping both hands focused on the central area of the keyboard.
This naturally raises the question: If “h,” “j,” “k,” and “l” function as direction keys, how can you input the four characters “h,” “j,” “k,” and ‘l’? The answer is “mode.” Vim has two main modes: normal mode and insert mode. In normal mode, all keys function as “function keys,” with “h,” “j,” “k,” and ‘l’ acting as direction keys. In insert mode, you can type as you would in a text editor, so “h,” “j,” “k,” and “l” input the corresponding characters. To enter insert mode from normal mode, press Esc. There are various ways to enter insert mode from normal mode, but the simplest is to press “i.” When editing with Vim, you will frequently switch between the two modes.
Normal mode is not just for moving the cursor. In normal mode, you can cut, copy, and paste much more efficiently than in a text editor. To cut or copy in a text editor, you first need to select the target text with the mouse and then press “ctrl+x” or “ctrl+c” on the keyboard. No matter how fast your hands are, this breaks the flow of the task. However, in Vim, you can complete such tasks instantly and smoothly. To cut a single word, press “dw”; to copy two words, press “2yw”; to cut a line, press ‘dd’; to copy a paragraph, press “y{”; to cut text within parentheses, press “di(”; and to copy text within brackets, press “ya[”. Additionally, pressing “v” enters visual mode, where you can move the cursor using keys like “h,” “j,” “k,” and “l” to quickly select a section of text. Then, pressing ‘d’ or “y” will cut or copy the selected text.
Here is a comprehensive example. The given text is “The quick brown fox jumps through the lazy dog,” and the goal is to correct the typo “bronw” to “brown” and replace “through” with “over.” The cursor is currently positioned after the ‘g’ in “dog.” To complete this task in Notepad, move your right hand away from the keyboard, grab the mouse, click precisely between the “n” and ‘w’ in “bronw,” then return your right hand to the keyboard, press the Backspace key, and use the right arrow key to move the cursor to the position after the “w.” type “n,” then grab the mouse again, double-click ‘through’ to select it, and return to the keyboard to type “over.” Even with fast hands, this takes several seconds and is tedious, making mistakes easy. To complete the same task in Vim, simply type “Fnxpftcwover” in normal mode, and it’s done. A skilled user can do it in less than a second. Explaining the meaning of “Fnxpftcwover” in detail would take a long time, but in short, Vim’s efficiency is so superior to a regular text editor that it’s truly impressive.
While Vim itself can only edit text files, Vim plugins can be installed in popular software like MS Word and Chrome. With these plugins, you can switch modes and edit text efficiently in these programs just like in Vim.
Vim’s features are far more extensive than what has been described here, and it typically takes several months to learn and become comfortable with most of its functions. The only drawback of Vim is that it requires study and practice. However, once you become proficient in Vim, you will be completely hooked, and you will never want to go back to using a regular text editor again.

 

About the author

Writer

I'm a "Cat Detective" I help reunite lost cats with their families.
I recharge over a cup of café latte, enjoy walking and traveling, and expand my thoughts through writing. By observing the world closely and following my intellectual curiosity as a blog writer, I hope my words can offer help and comfort to others.