Mercurial > public > dotfiles
comparison vim/.vimrc @ 21:083b3c7ae8c0
Update ctags generation.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 18 Dec 2014 20:24:45 -0600 |
parents | 33114558b770 |
children | 4408beef769d |
comparison
equal
deleted
inserted
replaced
20:33114558b770 | 21:083b3c7ae8c0 |
---|---|
65 let mapleader="\\" | 65 let mapleader="\\" |
66 | 66 |
67 " ctags support | 67 " ctags support |
68 | 68 |
69 function BgnCtags() | 69 function BgnCtags() |
70 let d = fnamemodify(findfile("root.dir", ";"), ":p:h") | 70 let s:d = finddir(".hg", ";") |
71 let tags = d . "\\tags" | 71 if s:d == "" |
72 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 | 72 let s:d = finddir(".git", ";") |
73 echo s | 73 endif |
74 call system(s) | 74 if s:d == "" |
75 echo "No root directory found" | |
76 return | |
77 endif | |
78 let s:path = fnamemodify(s:d, ":p:h:h") | |
79 let s:tags = s:path . "/.tags" | |
80 let s:cmd = "ctags -R --c++-kinds=+p --fields=+iaS --extra=+q --languages=-all --languages=+c,c++,python,actionscript -f " . s:tags . " " . s:path | |
81 echo s:cmd | |
82 call system(s:cmd) | |
75 endfunction | 83 endfunction |
76 | 84 |
77 nnoremap <F8> :call BgnCtags()<CR> | 85 nnoremap <leader>c :call BgnCtags()<CR> |
78 nnoremap <F9> :tn<CR> | 86 "nnoremap <F9> :tn<CR> |
79 nnoremap <F10> :tp<CR> | 87 "nnoremap <F10> :tp<CR> |
80 nnoremap <F11> :tj<CR> | 88 "nnoremap <F11> :tj<CR> |
81 set tags=tags;/ | 89 set tags=.tags;/ |
82 | 90 |
83 " Trial settings | 91 " Trial settings |
84 set wildmenu | 92 set wildmenu |
85 set wildmode=list:longest | 93 set wildmode=list:longest |
86 set laststatus=2 | 94 set laststatus=2 |