What is your most productive shortcut with Vim?

Your problem with Vim is that you don’t grok vi. You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way … Read more

How do I exit the Vim editor?

Hit the Esc key to enter “Normal mode”. Then you can type : to enter “Command-line mode”. A colon (:) will appear at the bottom of the screen and you can type in one of the following commands. To execute a command, press the Enter key. :q to quit (short for :quit) :q! to quit … Read more

vim remove non existing mapping [closed]

It fails because do_map returns 2 for unknown mapping and this code throws error for this case. Not very helpful, I guess. Annotate says that this code did not change from the very first version of vim found in the mercurial repository (7.0001). There may be different answers: I can guess of three: vi compatibility: … Read more