New answers tagged


This works for me if you want something simple: " Move selection up xmap <kMinus> :move '<-2<CR>gv " Move selection down xmap <kPlus> :move '>+1<CR>gv


This is a line range (see :h :range). "The dot" means the current line. So it's the current line and the next three ones. The operation to perform over this line range, of course, depends on the command you type in the command-line. So 4: is just a handy "shortcut" to input line range.


Check vim help for the following entries: :h function-list :h setbufline() -- what you probably need :h getbufline() -- and also this. :h appendbufline() -- and this.

Top 50 recent answers are included