Hot answers tagged

5

To close the quickfix window, you use :cclose, as @statox mentioned in the comments. This won't affect which code buffer you're viewing, though. Vim doesn't distinguish between the buffer you were looking at originally and the buffers you navigated to via the quickfix, so to go back you are going to have to use Vim's regular buffer switching commands. If ...


2

I use a shell function to perform git checkout. (I call it gco.) This function performs some index updating, if the checkout succeeds. (In my case I am interested in updating my cindex, while you want to update your cscope.) gco() { git checkout "$@" local ret_status="$?" if [ "$ret_status" = 0 ] && [ -n "$POST_GIT_CHECKOUT" ] ...


2

Ensure setting the cscope using the following in your ~/.vimrc file: set cscopetag set cst set csto=0 set tags=./tags,tags;/ cs add cscope.out Once it is done, re-login into the terminal to run cscope. Jump to a tag: Ctrl] Jump back: CtrlO Jump to a tag again: CtrlI


2

GNU Global's distribution already has a couple of vim scripts that are pretty handy. Look for 'gtags.vim' and 'gtags-cscope.vim' (the most adequate probably for what you want) in Global's installation directory, and just copy the one you prefer to your 'plugins' dir inside vim's config. The second script will do a set csprg=gtags-cscope for you, which ...


1

Invoke vim as view on the command line: view myfile.c This will automatically set the appropriate “readonly” flags.


1

It seems, that the following works: :cs find e status[ ]=


1

In the source code directory use the following command: find . -name '*.cpp' -o -name '*.h' > gtags.files gtags --accept-dotfiles -c -f gtags.files This will build the cross reference. In vim, you can issue the following command to invoke gtags-cscope :GtagsCscope


Only top voted, non community-wiki answers of a minimum length are eligible