# HG changeset patch # User Brian Neal # Date 1418955885 21600 # Node ID 083b3c7ae8c0a2791651d8a066d2fdd7b469ce14 # Parent 33114558b7709d48b5bc64ffc727a376149458cf Update ctags generation. diff -r 33114558b770 -r 083b3c7ae8c0 vim/.vimrc --- a/vim/.vimrc Thu Dec 18 18:34:02 2014 -0600 +++ b/vim/.vimrc Thu Dec 18 20:24:45 2014 -0600 @@ -67,18 +67,26 @@ " ctags support function BgnCtags() - let d = fnamemodify(findfile("root.dir", ";"), ":p:h") - let tags = d . "\\tags" - let s = "ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --exclude=Coe_prune --exclude=Opnet --languages=-all --languages=+c,c++,python -f " . tags . " " . d - echo s - call system(s) + let s:d = finddir(".hg", ";") + if s:d == "" + let s:d = finddir(".git", ";") + endif + if s:d == "" + echo "No root directory found" + return + endif + let s:path = fnamemodify(s:d, ":p:h:h") + let s:tags = s:path . "/.tags" + let s:cmd = "ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=-all --languages=+c,c++,python,actionscript -f " . s:tags . " " . s:path + echo s:cmd + call system(s:cmd) endfunction -nnoremap :call BgnCtags() -nnoremap :tn -nnoremap :tp -nnoremap :tj -set tags=tags;/ +nnoremap c :call BgnCtags() +"nnoremap :tn +"nnoremap :tp +"nnoremap :tj +set tags=.tags;/ " Trial settings set wildmenu