6

I'm using Eclimd for completion. it generates a lot of helpful info about function, but in 1-line preview window it looks messy. (same window uses by omni-completion)

So:

  1. Is there any way to change default preview window height?
  2. Make preview-popup instead of preview-window?
tshepang
  • 12,111
  • 21
  • 91
  • 136
Andrew
  • 8,330
  • 11
  • 45
  • 78

3 Answers3

5

I am facing problems with 'previewheight' too so I came up with the following work around:

set previewheight=50
au BufEnter ?* call PreviewHeightWorkAround()
func PreviewHeightWorkAround()
    if &previewwindow
        exec 'setlocal winheight='.&previewheight
    endif
endfunc
theosp
  • 7,439
  • 3
  • 23
  • 24
  • +1 Thanks for this one! Was trying out vim-fugitive and the :Gstatus was being a one liner (pretty much useless) because my winheight was set to 999. – Vijay Dev Apr 26 '11 at 14:40
3

You can change the default height of the preview window by setting the 'previewheight' option.

too much php
  • 88,666
  • 34
  • 128
  • 138
  • Doesn't work for me, strange. Looks like it also deletes all newlines from preview-code. – Andrew Sep 15 '10 at 00:14
  • you have to put this in your .vimrc file: set previewheight=5 –  Jun 27 '11 at 04:49
  • setting previewheight in .vimrc is restricted to reducing it below 3 lines, because that is the upper limit *hardcoded in the Vim source code* (search for `g_do_tagpreview`), even though the default value of previewheight is 12. Pretty darn awkward. – ack Jun 07 '14 at 20:20
0

set previewheight didn't work for me, but set previewwindow winheight worked for me.