vim之对taglist插件的小修改

原版的taglist不能在修改完保存后立即刷新,更改完后可以实现保存后即可刷新:

把:
if !exists('Tlist_Process_File_Always') let Tlist_Process_File_Always = 0 endif 改为: if !exists('Tlist_Process_File_Always') let Tlist_Process_File_Always = 1 endif

在原版插件中加入红字代码部分

   1: " Refresh the taglist
   2:     if g:Tlist_Process_File_Always
   3:         autocmd BufEnter * call s:Tlist_Refresh()
   4:         autocmd BufWritePost * call s:Tlist_Refresh()
   5:     endif
   1: " Automatically add the tags defined in the current file to the menu
   2:     augroup TagListMenuCmds
   3:         autocmd!
   4:  
   5:         if !g:Tlist_Process_File_Always
   6:             autocmd BufEnter * call s:Tlist_Refresh()
   7:             autocmd BufWritePost * call s:Tlist_Refresh()
   8:         endif
原文地址:https://www.cnblogs.com/tshell/p/2754061.html