Questions tagged [cscope]

Cscope allows more powerful examination of C code than c-tags. Vim has builtin support for using the cscope utility as a tags source.

Filter by
Sorted by
Tagged with
0 votes
0 answers
787 views

cscope E257: cstag: tag not found

I try to compile vim with cscope. However, I keep encountering the error E257: cstag: tag not found, no matter what position the cursor locates at when pressing CTRL ]. My vim version is 8.2. My dir ...
1 vote
1 answer
238 views

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

I have generated tags using ctags -R . In Vim I'm able to find the tag when I type :tag TagName and it does jump to it. However, if I have a cursor over the TagName and do Ctrl+] vim shows cstag: tag ...
0 votes
1 answer
1k views

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

I'm trying to write a vim function to update ctags and cscope databases. I'm trying to save the vim variable projectRoot in environment variable then expand this enviroment variable in the find ...
5 votes
2 answers
6k views

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

I use gutentags and gutentags-plus for generating and managing tag files. When I use the key combinations setup by them ( cX usually ), it opens the relevant lines in a quickfix window and I can use :...
3 votes
0 answers
102 views

Highlight tag matches for better visibility

When I search for occurrences of some frequent pattern (lets say finding a c symbol), I'll get a list of suggestions at the bottom of vim. Is there a way that the pattern is highlighted for easier ...
1 vote
2 answers
122 views

Read-only mode in Vim while using cscope?

I am traversing through a C code in Vim using cscope. Sometimes while traversing, some key gets pressed or mouse gets right-clicked and the Vim enters in insert mode, and it creates a mess to undo the ...
1 vote
0 answers
49 views

cscope adds home directory twice to a file and can't find it

When choosing a location suggested by :cs find s, the home path is appended twice as seen in the picture so cscope can't recognize it. Type number and <Enter> (empty cancels): 4E429: File "/...
6 votes
2 answers
2k views

Bidirectional tag stack movement with cscope in vim

When using ctags, one can move back through the tag stack by using [count]CTRL-T or :[count]pop, and forward using :[count]tag However, when using cscope instead of ctags and setting 'cscopetag', ...
1 vote
0 answers
605 views

cscope database loading issue with gvim

I generally use vim + cscope on Linux, and it works great. I have recently started using Cygwin on Windows 7, and I have been trying to replicate my development environment, with gvim and cscope. My ...
8 votes
2 answers
5k views

GNU global and vim

Has anyone used GNU global with vim? I'm navigating through a large C++ code base and have some trouble figuring out how to use it. I want to use its gtags-cscope functionality but I can't figure out ...
3 votes
0 answers
487 views

How to configure cscope to select the BEST definition

On large projects, there might be many definitions over many different files and folders for a given symbol. Usually the one you want is the one that is unique to the local area you are working in. ...
1 vote
0 answers
349 views

Why the result file of cscope found in quickfix window can't be showed in file explorer?

When I configured cscope in vim, I have installed some plugins such as Minibufexplorer, but I found that when I use cs find s, the result could be showed in the quickfix, and none of the option file ...
1 vote
1 answer
1k views

Using cscope to search for patterns with spaces

I have the following problem. Consider this line: uint8_t status = 0x00; Now if I want to search for the occurence for the status, I will get LOADS of references (nearly every module uses some sort ...
0 votes
0 answers
71 views

Searching for method definitions with cscope and ctags (or anything else) [duplicate]

Is there a way to search for method definition with some Vim plugin? Suppose there's a method with rather generic name, something like User user; cout << user.get_name() << endl; Is ...
5 votes
0 answers
4k views

Using GNU GLOBAL and gtags-cscope in vim

Now I am learning how to use GNU GLOBAL in vim. I have installed gtags.vim. I have gtags the kernel source directory. The .vimrc includes the following lines: set cscopetag set csprg=gtags-cscope ...
2 votes
1 answer
357 views

Keeping cscope db updated

I work on a large project with many contributors and everyday I usually have to regenerate to keep this up to date and that is very time consuming. Do any of you have any unique solutions to help ...