O'Reilly logo

Mastering Vim by Ruslan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command-line and ex modes

Command-line mode is entered by typing a colon (:) or when searching for text with / or ?, and allows you to input a command until you hit Enter. Command-line mode provides some useful shortcuts:

  • The up and down arrows (or Ctrl + p and Ctrl + n) let you traverse command history one by one 
  • Ctrl + b and Ctrl + e let you go to the beginning and the end of the line respectively
  • The Shift or Ctrl keys combined with left or right arrows allows you to move by words

A highly useful shortcut is Ctrl + f, which opens an editable command-line window with a history of the commands you ran:

For editing purposes, it's a regular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required