Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sometimes in Vim, I'm typing a command and realise that I could really use Vim's motion commands for navigating the command-line:

  • :s/somthing/else/
  • realise that I misspelled something.
  • Fmae and be done with it.

Of course, trying this would just put Fmae at the end of the command. Is there any way to get (a subset of) the vim commands into the vim command-line? After all, that's what it does.

share|improve this question
up vote 4 down vote accepted

When i need to edit a long command in command line, i use q+:

then i see a list of my last commands and i can move with regular vim motions and it's easy to edit.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.