Professional Documents
Culture Documents
Vim Guide
Vim Guide
:cp
Previous match
gg
Goto top of file
h, l, j,k
left,right,up,down
df<char>
Delete from current cursor to first occurrence of character.
Backspace/delete key works too.
<range> :s /pattern/replacement/<options>
<range> can be x,y to operate between lines x and y. If y is not
specified, it means to current positions.. $ for end of file.
:bd, :bd<number>
Close buffer
Close specific buffer
" Map F4 to search word at cursor for all files in cur directory.
" do not jump to first match and open results window.
map <F4> :execute "vimgrep /" . expand("<cword>") . "/j *.*" <Bar> cw<CR>
" Run make but don't jump to 1st error and then call copen to show output.
map <F2> :execute "make!" <Bar> copen <CR>