How can I move around in the Vim command line?

Tap Ctrl+F while in command-line mode (just after :). There you'll get command-line window which could be edited&navigated as a regular vim window (hjkl etc.).

See :h cmdline-window for details.


Type

:h cmdline-editing

for details. I am listing a few of the interesting non-arrow commands that do something similar to what you want.

  • ctrl-B: cursor to beginning of command-line
  • ctrl-E: cursor to end of command-line
  • ctrl-W: delete the word before the cursor
  • ctrl-U: remove all characters between the cursor position and the beginning of the line

Tags:

Vim