Je suis nouveau à vim alors j'essayais de modifier un script existant pour le fichier vimrc. Le script prendra le contenu du tampon courant et le copiera dans une nouvelle fenêtre, puis exécutera Python. Le scrip fonctionne mais la fenêtre d'aperçu est toujours 50% de la fenêtre courante.VIM: Taille de l'aperçu
Voici le 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>
J'ai essayé niveau des lignes, définissez previewheight, réglez PVH, winc 10 -, ... mais rien ne semble fonctionner. Est-ce que quelqu'un sait comment je peux changer la hauteur de la fenêtre d'aperçu?
C'est semble donner une « erreur d'option Unknown ». – Pickels
Excellent, ça marche. Grand merci. – Pickels