diff options
author | Simon Howard | 2009-05-26 21:13:18 +0000 |
---|---|---|
committer | Simon Howard | 2009-05-26 21:13:18 +0000 |
commit | 7b70d415d1acf162e6fe6f136148cf30ba4e3daa (patch) | |
tree | d9587a1ed33f1e0826b9608697022f61e278f881 | |
parent | bd20fc62a36475e7a9fff269784d0f1e5c1128b4 (diff) | |
download | chocolate-doom-7b70d415d1acf162e6fe6f136148cf30ba4e3daa.tar.gz chocolate-doom-7b70d415d1acf162e6fe6f136148cf30ba4e3daa.tar.bz2 chocolate-doom-7b70d415d1acf162e6fe6f136148cf30ba4e3daa.zip |
Set appropriate vim 'tags' variable for ctags files.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1531
-rw-r--r-- | .lvimrc | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -4,3 +4,28 @@ set tabstop=8 set softtabstop=4 set shiftwidth=4 +" Add all tag files to tags path. + +let topdir = findfile("configure.in", ".;") +let topdir = substitute(topdir, "configure.in", "", "") + +" Check tags file in current dir: +set tags+=tags + +" Add tag files in parent directories: +let tagfiles = findfile("tags", ".;", -1) + +" Add tag files for libraries: +call add(tagfiles, topdir . "textscreen/tags") +call add(tagfiles, topdir . "pcsound/tags") + +for tagfile in tagfiles + " Don't go beyond the project top level when adding parent dirs: + if stridx(tagfile, topdir) >= 0 + exec "set tags+=" . tagfile + endif +endfor + +unlet topdir +unlet tagfiles + |