Skip to content

Instantly share code, notes, and snippets.

@coreyrothwell
Last active August 29, 2015 14:06
Show Gist options
  • Save coreyrothwell/cdcf0f11c4868073bd88 to your computer and use it in GitHub Desktop.
Save coreyrothwell/cdcf0f11c4868073bd88 to your computer and use it in GitHub Desktop.
VIM Notes
daw - delete a word and spaces
diw - delete only word
* - find next word under cursor
C-h delete a char
C-w delete last word
C-u delete current line
C-r0 paste
C-r=math calculate
zz - center screen on line
R - insert mode
gv - reselect recent visual selection
gj/k - down / up visual line
ge - go to end of previous word
o - go to other end of visual selection
----------------------------------
EX
:{line number | range}{command}{destination line}
. - current line
.+3 - current line + 3 lines
$ - last line
:start,end{command}
:copy - :t - :co
:{range}:normal {command(Apoop!)}
set wildmode=longest,list
<C-r><C-w> copy word under cursor to vim command line
q: - history window
:ls view buffers
:b{num|name} open buffer
:bnext / :bprev
:wa - write all
Split windows
<c-w>s / :sp
<c-w>v / :vs
<c-w>hjkl
N<c-w>_| - change height/width num of lines
<c-w>T - move window to new tab
:tabmove N - move current tab to N
m{char} - set mark
'{char} - go to mark line
`{char} - go to mark
(mm - set / `m - go)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment