CTRL+Q- Turns on flow-control (if you turned it off by mistake)CTRL+a- increment number:cw- toggle quickfix listCTRL+E- scroll window down (cursor stays)CTRL+Y- scroll window up (cursor stays):r- retrive (:r filename- loads file at cursor.:r !ls- loads ls at cur)
:x- exit (with save):e <path>- open path:w- write (save):e!- restore file (lose changes):saveas <path>- save to new file:edit- open file in buffer
100G- line 100gg- line 1G- last lineg;- go back to last edit point (move back though changelist)g,- move forward through changelistCTRL+o CTRL+i- prev/next gototwo backticks- go back to where you weregi- go back to last insert{, }- prev, next paragraphw- start of next word (only alphanumeric + underscore)e- end of wordW- start of next wordE- end of word%- matching bracket*- next occurence of word#- previous occurencefp- find nextpFp- find previousptp-fpbut move cursor beforeTp-Fpbut move cursor before,- find next occurrence;- find previous occurrence3fa- find 3rd occurrence ofa^- go to first non-space char on line$- end of line/- search forwards?- search backwards:/s/old/new/g- subtitue old for new:1,10s/- only between lines 1 and 10:%s/- whole file
u- UndoCTRL+r- Redo!!- repeat last commandv- visual selectV- select linea- Insert after cursor (append)A- Insert end of lineo- Insert new line (open)O- Insert new line beforecw- (change) replace to end of worddw- delete to end of worddd- cut lineyy- Copy line (yank)p- paste (put)P- Paste before0y$- yank from beginning to end of lineye- yank to end of linedt"- remove everything until"J- join lines<- indent left>- indent right=- autoindentCTRL+v+ move down - block selectI#ESC- comment each lineCTRL+n- complete wordCTRL+p- complete word (previous)X- delete char to left of cursors- delete char and enter insert mode
:ls- list buffersa- active#- alternate buffer+- buffer modifiedh- hidden (unsaved changes and is not currently loaded in a window)
CTRL-^- switch between active and alternate buffers:bn- buffer next:bp- buffer previous:bd!- remove buffer (lossing changes)
ctrl-w w- cycle between windows:split- split window orsp:vsplit- vertically split windowCTRL+w hjkl- switch windowsCTRL+w c- close windowCTRL+w n- new windowCTRL+w s- new split horizontallyctrl+w v- new split vertically:sp <filename>- split window and open fiename:vsp <filename>- split virtially and open filenamectrl+w +/-- resize windows
:tabe <file>- open file in new tab:tabedit <file>gt- next tabgT- prev tab2gt- goto tab 2:tabclose- close all windows in current tab:tabonly- close all tabs execpt current onectrl-w T- move current window into its own tab:ls- list buffers:b22- goto buffer 22:b <match>- goto buffer (tab to complete)
qa- record actions in macroaq- end macro@a- playbacka@@- playback last macro
[s,]s- move to next/prev mispealt wordz=- find suggested alternativeszg- add to dictionaryzw- mark as misplealt
:Rake- Run rake:A [file]- Alternate file/spec or load:AS [file]- As above but split horizontally:AV [file]- As above but split vertically:AT [file]- As above but open in new tab:Elib [file]- Edit lib file or Gemfile:Espec [file]- Edit spec file or spec_helper:Ctags- Ctags for the project