Is there a “vim runtime log”?

前端 未结 6 847
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-12 10:42

Sometimes I try a customization/command in my vimrc. Everything seens to be correct, but it just doesn\'t work.

It\'s difficult to know what\'s happening when vim st

6条回答
  •  星月不相逢
    2020-12-12 11:41

    Put this function into .vimrc:

    function! ToggleVerbose()
        if !&verbose
            set verbosefile=~/.log/vim/verbose.log
            set verbose=15
        else
            set verbose=0
            set verbosefile=
        endif
    endfunction
    

    Then create directory ~/.log/vim and call ToggleVerbose() to get your log in ~/.log/vim/verbose.log. Note that you may catch «variable nested too deep for displaying» error which will not normally appear just because you have raised your verbose level.

提交回复
热议问题