Category Archives: vim

Vim + Ctags 更新

由于开发时常常使用Ctags进行跳转查询,因此特意写了一个函数用于更新ctags 代码: “递归查询父文件夹的tags文件,这样在项目的那个文件夹当中就都可以访问同一个tags文件了 set tags=tags; “更新ctags,找寻父文件夹原有tags文件 function UpdateCtags()    let curdir=getcwd()    while !filereadable(“./tags”)        cd ..        if getcwd() == “/”            break        endif    endwhile    if filewritable(“./tags”)        !ctags -R –c++-types=+px –excmd=pattern –exclude=Makefile –exclude=.    endif    execute “:cd ” . … Continue reading

Posted in vim | Tagged , , | Leave a comment