From the Why-didn't-I-do-this-before department (vim+cscope)
Posted July 15th, 2010 by dvhart
in
I finally got tired of lack specifiers in "git grep" and the cscope ncurses interface. I spent a few minutes and setup the vim cscope plugin using this mighty fine tutorial:
http://cscope.sourceforge.net/cscope_vim_tutorial.html
The one gotcha I ran into was having to disable my vim setting that automatically changed the working directory to that of the open file - it broke the cscope plugin relative filenames.
" automatically switch the cwd to that of the file in the buffer " This breaks cscope plugin " autocmd BufEnter * :cd %:p:h
Very, VERY VEERRRYYY nice. Now if only I could get a full call graph out of it...



Comments
@Bryan: I used emacs for a
@Bryan: I used emacs for a while in college, but eventually decided vim was more my style. I like one tool everywhere, and with as much remote system work I do, it's rare that I won't have vim installed.
@Vernon: you don't like ":cs f g" ? Seems perfectly intuitive to me, maybe you should use Emacs ;-)
Good timing
I went to google to find information on how git and cscope might play together and there on my google homepage in the reader box was this article. Nice timing.
It is nice that it is all tied in with vim, but it still feels a little clunky. I like the cscope interface better, but I get the feeling that in order to embed that kind of crap in your editor, you have to use emacs. :)
Post new comment