sponsor Vim development Vim logo Vim Book Ad

basic Tip #887: q/ and q?  (Those are Q's)

 tip karma   Rating 66/26, Viewed by 1977 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   March 3, 2005 11:01      complexity:   basic
author:   Tye Z.      as of Vim:   6.0

Oops.  I went to do a q: and accidentally hit q?.  I was suprised to find myself in the command line editing window, only editing previous searches.

I thought this was  obscure enough to warrant a tip.  :)

 rate this tip  Life Changing Helpful Unfulfilling 

<< Adding vim.exe to windows "Send To" context menu. | :e(dit) multiple files with a single command >>

Additional Notes

thomas@intevation.de, March 3, 2005 22:18
q/ works, too.

Related to this is the 'cedit' key, which defaults to <C-F>.
While on the command line or in a search you can use it to switch to the editing window.

If you use
  set cedit=<Esc>
it's even more like editing normal text, which is important for people used to hjkl for cursor movement.
Ivan Tishchenko, March 4, 2005 4:35
I knew about q[:/?], but 'cedit' -- that is a really useful thing for me in your tip.  I didn't know about the hotkey which switches from command-line to command-line window.  Thanks a lot.
Anonymous, May 11, 2005 20:06
also see tips 928 http://www.vim.org/tips/tip.php?tip_id=928
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to vim@vim.org after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge.net Logo