Skip to content

Scroll the quickfix window only if cursor is on the last line

Linwei edited this page Oct 11, 2016 · 16 revisions

if you set g:asyncrun_last to non-zero (it is zero by default):

let g:asyncrun_last = 1

Quickfix window will scroll only if the cursor is on the last line, just like output panel of visual studio.

But there are some downsides:

  1. unlike :cbottom it is not native supported by vim (simulated in vimscript), checking cursor will have a lower performance, but most of time it's acceptable.
  2. sometimes cursor blinks in a strange frequency, but not noticeable.

due to these matters, g:asyncrun_last has been set to zero by default, you can turn it on manually.

Clone this wiki locally