Syntastic close error window and original file window

十年热恋 提交于 2019-12-05 06:05:54

That's the normal Vim behavior; it has nothing to do with Syntastic. The quickfix or location list windows may contain references to other files, so it is not certain that you want to completely leave Vim when quitting from the originating window.

The simplest solution is using :qa (quit all) instead of :q. As the error window doesn't contain unpersisted changes, this is safe and doesn't require a confirmation.

If you are annoyed by having to think about this, you can use Vim's scripting capabilities to change its behavior:

:autocmd WinEnter * if &buftype ==# 'quickfix' && winnr('$') == 1 | quit | endif

This checks on each change of window whether there's only one window left, and if that one is a quickfix / location list, it quits Vim.

sunjerry

Try the below command:

:lclose

PokerFace

According to Syntastic help, the command to close Syntastic error window is:

:SyntasticReset
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!