Vim “yank” does not seem to work

If you have the setting set clipboard=unnamedplus in your .vimrc then this will not be working. For OSX you have to use set clipboard=unnamed For Linux you will probably need to use set clipboard=unnamedplus Heres the snippet from my personal .vimrc if system(‘uname -s’) == “Darwin\n” set clipboard=unnamed “OSX else set clipboard=unnamedplus “Linux endif

Vim yanking range of lines

Yank lines 81-91 :81,91y<enter> If your fingers don’t like to find the : and , keys, this would work as well (go to line 81, yank 11 lines) 81gg11yy My only use of g is 5gg. To go to the 5th line. 22gg: 22nd line. As jimbo said, it’s really only a modifier for some … Read more

How to select between brackets (or quotes or …) in Vim?

To select between the single quotes I usually do a vi’ (“select inner single quotes”). Inside a parenthesis block, I use vib (“select inner block”) Inside a curly braces block you can use viB (“capital B”) To make the selections “inclusive” (select also the quotes, parenthesis or braces) you can use a instead of i. … Read more

tech