Show Menu
Cheatography

square-maximum-awesome Cheat Sheet (DRAFT) by

shortcut of maximum-awesome

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 surrou­nding 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 assign­ments
<C-­hjk­l>
move between windows, shorthand for <C-­w> hjkl

ctags for ruby

ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)

fugitive

:Gblame
:Gdiff
 

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/p­revious string in the prompt's history.
<c-­y>
to create a new file and its parent direct­ories.
Use <c-­z> to mark/u­nmark 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
Recurs­ively refresh the current directory
m
open menu