Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When using vim, I sometimes get myself into this screen that has multiple command line rows. What is this screen for? How do I take advantage of it or get out of it?

enter image description here

share|improve this question

1 Answer 1

up vote 11 down vote accepted

That is the command line history window. Check here.

It appears when you type q: (you also have a search history if you type q/). This windows allows you to edit your command and search history. Press ctrl + c twice to cancel.

share|improve this answer
2  
I found myself accidentally, frequently opening this window, and since I never use it anyway, I finally did this to prevent it: :nnoremap q <nop> –  Heptite Jul 15 '12 at 1:22
    
It happens to me a lot also. But I use it so I cannot do this. But it is a great tip. –  criziot Jul 15 '12 at 4:04
    
The cedit key (defaults to Control-F) is the other way to open these history windows (after typing a normal :, /, or ?). –  Chris Johnsen Jul 15 '12 at 5:59
    
@Heptite: Remapping q will prevent you from recording macros. Also, if you enter command line history window, you can type i and then work as normal (type your command and hit enter), but you have the benefit of hitting esc and then editing the command like a normal vim buffer. –  idbrii Dec 5 '12 at 18:06
    
@criziot: It can also be closed like a regular vim window: :q or Ctrl-w q also work. –  idbrii Dec 5 '12 at 18:07

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.