Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.32 KB

vim_cheat_sheet.md

File metadata and controls

47 lines (38 loc) · 1.32 KB

Vim Cheatsheet

  • :%s/foo/bar/gci: Find an replace "foo" with "bar", ask for confirmation, case insensitive.

  • V: Select lines.

  • .: Repeat last command.

Configuration

  • $ vim -u .my.vimrc: Start Vim with a particular configuration file.
    • Use NONE to start Vim with no configurations.

History

  • :his: List command history.
  • :his /: List search history.
  • Command Line Window
    • q:: Commands.
    • q/: Searches.
  • : up-arrow: Scroll through history.
  • / up-arrow: Scroll through searches.

File Explorer

Shell Commands

  • :! ls: Execute shell command.
  • :r ! ls: Execute shell command, put output in current buffer.

Splits

Indentation

  • <: Unindent line.
  • >: Indent line.
  • 5>>: Indent 5 lines.
  • >%: Indent curly brace block.