You mean 'G' command ?

I write a single script to get quickfix autoscroll, problem seems have been 
solved
by 'normal G' with 'windo'.but the cursor seems a little strange:
1. blinks in a strange frequency: sometimes fast and sometimes slow
2. 'moving cursor to quickfix window and back' is noticeable, especially in gvim
3. sometimes cursor moves to ex-command area and stays 1 second and returns to 
the previous window

version: 7.4.1902

quickfix_autoscroll.vim
--------------
" scroll down
function! Quickfix_Scroll()
if getbufvar('%', '&buftype') == 'quickfix'
normal G
endif
endfunc

" find quickfix window and scroll to the bottom then return last window
function! Quickfix_AutoScroll()
let l:winnr = winnr() 
windo call Quickfix_Scroll()
exec ''.l:winnr.'wincmd w'
endfunc

" timer callback: simulate a long-time-running job
function! Callback(id)
if !exists('s:index')
let s:index = 0
else
let s:index = s:index + 1
endif
caddexpr "output ".s:index
call Quickfix_AutoScroll()
endfunc

let s:index = 0
let s:id = timer_start(1000, 'Callback', {'repeat':30})

cexpr ""
copen 5
wincmd k
--------------------

Quickfix seems to be designed for the old synchronizing usage (make/grep)

But after job/channel have been implemented, quickfix should be widely used to 
display 
realtime output of the background process . 

When background process takes a long time (eg. rebuilding vim source code), 
autoscroll
enables me to watch the building progress and the output while I am editing / 
navigating the source files
just like what I do in visual studio.

Auto scroll can be simulated by using the script above, but is this a 
appropriate way ? (cursor problem, etc)
Is it possible to do this in a more graceful/easier method ? 



skywind3...@163.com
 
From: Bram Moolenaar
Date: 2016-06-07 03:38
To: skywind3...@163.com
CC: vim-dev
Subject: Re: Any way to scroll quickfix window automatically for 
long-time-running jobs ?
 
skywind wrote:
 
> Since redirecting the job output to quickfix, I need quickfix window
> can scroll to the last line when a new text line added to quickfix. 
> 
> So I can always see the latest output of a long time running job in
> realtime.
> 
> Previously I used `clast` after `caddexpr` in the job callback to
> scroll quickfix but it alway open the last error in the new tab.
> 
> Is there a way I can just only scroll quickfix without open the last error ?
 
You can use
:copen 
$
{jump back to original window}
 
Note that recent changes were made to avoid updating the screen each
time, because it was slow.  These commands will make it slow again.
You could use a timer to postpone the scrolling or only update once in
so many times.
 
-- 
hundred-and-one symptoms of being an internet addict:
56. You leave the modem speaker on after connecting because you think it
    sounds like the ocean wind...the perfect soundtrack for "surfing the net".
 
/// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
 
-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
 
--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui