How can I make Vim paste from (and copy to) the system’s clipboard?

TL;DR Try using “*yy or “+yy to copy a line to your system’s clipboard. Full answer Be aware that copying/pasting from the system clipboard will not work if :echo has(‘clipboard’) returns 0. In this case, Vim is not compiled with the +clipboard feature and you’ll have to install a different version or recompile it. Some … Read more

Delete first word of each line

:normal to the rescue: :%norm dw It basically replays the arguments as if you were typing them in normal (‘non-edit’) mode. From :help : :norm[al][!] {commands} Execute Normal mode commands {commands}. This makes it possible to execute Normal mode commands typed on the command-line. {commands} is executed like it is typed.

Jump to the next word in insert mode

There’s a very useful table of insert mode motions at :h ins-special-special. <S-Left> cursor one word back (like “b” command) <C-Left> cursor one word back (like “b” command) <S-Right> cursor one word forward (like “w” command) <C-Right> cursor one word forward (like “w” command) You’ll find that Shift-Left/Right and Ctrl-Left/Right will do the trick. Ctrl/Shift … Read more

E185: Cannot find color scheme*

For those using Plug as plugin manager, the problem may be solved by setting the color scheme after declaring the plugin that provides the theme: call plug#begin() Plug ‘rakr/vim-one’ ” tell Vim to load the theme/plugin call plug#end() colorscheme one ” set the color scheme after the theme provider has been loaded

tech