asyncrun.vim icon indicating copy to clipboard operation
asyncrun.vim copied to clipboard

Focus when invoking tail -f

Open aligit opened this issue 4 years ago • 2 comments

Hello

I would like to start tailing a log file but I can't exist the quickfix anymore. I also tried the option -focus=0 but it still switches to that quickfix. How can I prevent switching to quickfix?

:AsyncRun -mode=term -pos=bottom -rows=5 tail -f /$HOME/payara5/glassfish/domains/domain1/logs/serv
er.log

Best Regards, Ali

aligit avatar Jan 06 '21 05:01 aligit

Hello

I would like to start tailing a log file but I can't exist the quickfix anymore. I also tried the option -focus=0 but it still switches to that quickfix. How can I prevent switching to quickfix?

:AsyncRun -mode=term -pos=bottom -rows=5 tail -f /$HOME/payara5/glassfish/domains/domain1/logs/serv
er.log

Best Regards, Ali

The only way to get back to vim focus is to press ctrl-c(stop tailing process)

aligit avatar Jan 08 '21 05:01 aligit

When using -mode=term, the command will run in an internal terminal buffer, not quickfix window. <c-\><c-n> can be used to exit terminal mode and switch to terminal normal mode where you can switch window by <c-w>w.

For more information, please see: :h terminal.

For quickfix window, just watch your log by :

:AsyncRun tail -f  record.log

And stop watching by:

:AsyncStop

skywind3000 avatar Jan 08 '21 11:01 skywind3000