When performing autocompletion on PHP or javascript, vim opens a scratch buffer which contains info about the function being autocompleted.
Unfortunately, I increased the height of this scratch buffer by 8 lines with C-w, 8, +

Now the scratch buffer always opens really large (about 10 lines high).
Even closing and restarting vim makes no difference.
How can I reset the behaviour for this scratch buffer?

1 Answer 1


It's called "preview window" and you can read all about it in :help preview-window.

The 'previewheight' option should be what you are looking for.

  • thanks romainl, it worked exactly as you said! interesting that the setting persisted that way. vim usually flushes all settings - not saved into vimrc at shutdown. Oct 7, 2015 at 11:55
  • Do you use sessions?
    – romainl
    Oct 7, 2015 at 12:25
  • no, I dont know what sessions are. do you recommend them? Oct 7, 2015 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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