Frage

I'm using vim with python mode, and normally the script output is put in the Quickfix window at the bottom of the screen. Unfortunately this window doesn't get scrolled automatically, it always shows the top of the script. It would be ideally if it would be possible to have the window contents automatically scroll to always show the bottom of the output, so it would get updated during script execution. Do you have any ideas how this could be accomplished?

EDIT: I've just realized that the output window is not a quickfix window, but of some other type, I don't know what type. quickfix only gets populated when there are errors in the script. the command to go to the end of quicklist is :clast ,but of course it doesn't work with the python output because it's not put in the quicklist. so my question now is, do you know what type of window this is, and how to scroll to the end of it automatically.

Thanks in advance for any suggestions Y

War es hilfreich?

Lösung

I have this solved just automating what FDinoff said. Include this in your .vimrc:

augroup runcodegroup
    autocmd!
    autocmd FileType python nnoremap <buffer> <D-r> :Pyrun<CR><C-W>jG<C-W>k
augroup end

Change <D-r> (CmdR) to whatever mapping you desire to run your code and scroll the output.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top