Hello,
I am new to vim so I was trying to edit an existing script for the vimrc file. The script will take the content of the current buffer and copy it into a new window and then run Python. The scrip works but the preview window is always 50% of the current window.
This is the script:
" Preview window for python
fu! DoRunPyBuffer2()
pclose! " force preview window closed
setlocal ft=python
" copy the buffer into a new window, then run that buffer through python
sil %y a | below new | sil put a | sil %!python -
" indicate the output window as the current previewwindow
setlocal previewwindow ro nomodifiable nomodified
" back into the original window
winc p
endfu
command! RunPyBuffer call DoRunPyBuffer2()
map <f5> :RunPyBuffer<CR>
I tried set lines, set previewheight, set pvh, winc 10 -, ... but nothing seems to work. So does anybody know how I can change the height of the preview window?