How to refresh taglist in vim?

前端 未结 4 715
攒了一身酷
攒了一身酷 2021-02-14 13:27

When I make a change to a file, for example, add a function, how can I make the taglist automatically update the \"tag list\" in its windows after I save the change?

4条回答
  •  鱼传尺愫
    2021-02-14 13:54

    Haven't tested, but you could try something like:

    au BufWritePre     *.cpp ks|!ctags %
    

    Which basically executes ctags when the buffer for a file ending in .cpp gets saved(:w).

提交回复
热议问题