28 Jul '16, 12am

Literate Vim

Literate Vim Caleb Thompson July 28, 2016 vim Vim normal mode commands are made up of verbs, adverbs, and nouns. Many of them are mnemonic such as v isual, c hange, y ank and d elete. Others like ` are less obviously “go to” in context of a m ark. Some Vim plugins add additional commands. In this example, we rely on functionality from vim-unimpaired and vim-surround which add the [ and ya] /vi> functionality, respectively. Let’s break down a relatively verbose Vim normal model command: "wya]}[ "wpa: <https://example.com><Esc>vi> "w Apply the next command to a register named “w”. “w” happened to be an unused register in my Vim setup. ya] Y ank the text a round the brackets. } Move the cursor to the first line after the current paragraph. [ Insert a blank line above the cursor, but don’t move the cursor and stay in normal mode. The space is “” in :help files. "w Again, do so...

Full article: https://robots.thoughtbot.com/literate-vim