vim - Windows autoupdate cscope database from GVIM -


i work gvim , cscope c on window 7. but, cscope database gets outdated , when code updated. so, added following gvimrc

nmap <f11>  :cs k 0 <cr> :!cscope -br <cr> :cs cscope.out<cr> 

since, work 1 cscope database, sufficient kill first cscope database connection. however, when execute cscope command not run project root directory. can't figure out how instruct cscope/cmd.exe run cscope project directory within gvim.

how achieve this. there known plugins available feature ?

try out plugin made: https://github.com/mihaifm/bck

among other things has changetoroot command, changes vim's current working directory project root of current file.

the project root defined presence of several files/folders (root markers). defaults are: ['.git/', '.git', '_darcs/', '.hg/', '.bzr/', '.svn/', 'gemfile']

you can customize g:bckroots variable in .vimrc. need add .sln in there if you're compiling visual studio.

anyway, after this, mapping should this:

nmap <f11>  :cs k 0 <cr> :!cscope -br <cr>:changetoroot<cr>:cs cscope.out<cr> 

it load cscope.out project root.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -