This is a draft cheat sheet. It is a work in progress and is not finished yet.
Common Shortcut
shortcut |
usage |
,d |
toggle NERDTree sidebar |
,f |
open NERDTree to the current file |
,t |
brings up ctrlp.vim |
ds/cs |
delete/change surrounding characters |
gcc |
toggles current line comment |
gc |
toggles visual selection comment lines |
vii/vai |
visually select in or around the cursor's indent |
Vp/vp |
replaces visual selection with default register |
,[space] |
strips trailing whitespace |
<C-]> |
jump to definition using ctags |
,l |
begins aligning lines on a string, usually used as ,l= to align assignments |
<C-hjkl> |
move between windows, shorthand for <C-w> hjkl |
ctags for ruby
ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)
|
|
|
ctrlp.vim
<c-f> and <c-b> |
to cycle between modes. |
<c-r> |
to switch to vim regexp mode. |
<c-j>, <c-k> or the arrow keys |
to navigate the result list. |
<c-t> or <c-v>, <c-x> |
to open the selected entry in a new tab or in a new split. |
<c-n>, <c-p> |
to select the next/previous string in the prompt's history. |
<c-y> |
to create a new file and its parent directories. |
Use <c-z> to mark/unmark multiple files and <c-o> to open them. |
NERDTree
o/go |
open file |
t/T |
open file in new tab |
i/gi |
open file in split window |
s/gs |
open file in vsplit window |
P |
Jump to the root node |
p |
Jump to current nodes parent |
<C-J/K> |
Jump down to the near sibling of the current directory |
C |
Change the tree root to the selected dir |
u |
Move the tree root up one directory |
r |
Recursively refresh the current directory |
m |
open menu |
|
|
|