Guides and Tips

Search and Regex


Vim-Fugitive Git


Status mode

In status mode, use - to add a file to the stage.

Use U to revert a file.


meta-p - cycle backward through your history of yanks meta-shift-p - cycle forwards through your history of yanks

See yanks by :Yanks


:gcc :gcgc

File commands

  • Write file :w <fileName>
  • Write file and quit :wq
  • Edit a file :e <filename> (tab autocomplete works)
  • wa for writing all files
  • :e! revert to last save
  • !rm % remove file
  • :e . show the files & current in the current directory


Vim has several different modes

  • esc to get to Normal mode
  • i insert mode
  • v visual (for selecting sections of text by the keyboard to be operated on)
  • V visual selecting by lines


  • command mode :
  • Current working directory :pwd
  • :source ~/.vimrc to source a .vimrc
  • Source current file :so %
  • . references last command
  • ,ev edit vim config
  • :!<command> to run commandline command
  • :reg to registers (clipboard etc)

results matching ""

    No results matching ""