Vim - Command Line


Allows you to enter commands. To enter type :. This is technically a mode, but I thought it important enough to be a full subject.

Useful things to do in command mode:

  • :w: Write. Save file.
  • :q: Quit
  • :wq: Write and then quit
  • :!q: Force quit. Lets you quit without saving.
  • .: Repeat last command
  • :s/FIND/REPLACE/g: Find an replace text on current line
  • :%s/FIND/REPLACE/g: Find an replace text in entire document