10 votes
Accepted

How can I close the quickfix window and go back to the file I was editing

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 ...
Rich's user avatar
  • 31.9k
3 votes
Accepted

Vim function : how to expand vim variable in shell command?

The :execute command will assemble an Ex command from strings and evaluate it. Here, in this case, it's actually breaking your command, since it's expanding the g:projectRoot string and forming a ...
filbranden's user avatar
  • 28.8k
3 votes

Bidirectional tag stack movement with cscope in vim

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 ...
Vicky's user avatar
  • 131
2 votes

GNU global and vim

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 ...
n00bmind's user avatar
  • 121
1 vote
Accepted

Vim :tag can jump to the tag but using short key ctrl+] gives cstag: tag not found

With cscopetag enabled, you get E257 on tags not being found (credits Mass in the comments). Fortunately, the help for this error contains useful information: use :cstag! It can do searches in both; ...
D. Ben Knoble's user avatar
  • 26.2k
1 vote
Accepted

Read-only mode in Vim while using cscope?

Invoke vim as view on the command line: view myfile.c This will automatically set the appropriate “readonly” flags.
D. Ben Knoble's user avatar
  • 26.2k

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