# |---------- BASICS -------------| ZQ quit :x = :w > add indent for multiple lines >> add indent for current line < remove indent .. u for undo for redo vap select around the paragraph vi( etc.. . repeat last command D or d$ delete till end of line C or c$ change till end of line c = switch to insert mode after d e end of word $ end of line ^ beginning of line w for word p for para % match parenthesis daw and diw, a for around and i for inside, or dip/dap etc. di( to delete in (), di[, di{, di" etc. { pre para } next para zz put current line to center zt put current line to top C-e, C-y scroll up/down by line C-u, C-d scroll up/down by page gg=G fix indent (vim built-in) # File Location: show current location (in percentage) gg,G , go to top or bottom 25% go to 25 percent of file # split: :sp :vsp to split :res [n] to resize # buffers: :ls showbuffer :b[n] switch to buffer [n] # searching & replacing & substitute / and ? search forward and backward eg. rx replace all characters in selections with x R go to replace mode # sub: :s/old/new/g flag g means globally in line (or would be only one occurence) :%s/old/new/g replace in whole file :%s/old/new/gc replace in whole file, c flag asks for each replace # sorting: :sort , sort selected lines (by first letter) # time machine: :earlier 5m go back to 5 minutes ago (reverse the file and jump cursor location) # |--------CUSTOME MAPPINGS--------| mapped to :bn (next buffer) jump between splits/windows ss spell check use z= to show possible words # |-------- PLUGINS/ EXTERNAL-- ---| :ClangFormat (Plugin) #YCM COMPLETER g :YcmCOmpleter GoTo # files :NERDTreeToggle in NERDTree, use m to show filesystem operations menu # Programming mapped to ctag # NERDCommenter nmap c toggle comment # boxes select text and type :!boxes -d [design]