如何限制Vim Syntastic位置列表窗口的大小

Sha*_*ard 4 vim vim-plugin syntastic

Vim syntastic插件会弹出错误和警告位置列表,并且不必要地消耗了比列表所需更多的屏幕空间:

在此处输入图片说明

如何配置syntastic来打开仅具有足以显示列表的行的位置列表窗口?

Sha*_*ard 7

谢谢lcd047指出答案。我将以下内容添加到我的vimrc中,它起作用了:

" see :h syntastic-loclist-callback
function! SyntasticCheckHook(errors)
    if !empty(a:errors)
        let g:syntastic_loc_list_height = min([len(a:errors), 10])
    endif
endfunction
Run Code Online (Sandbox Code Playgroud)