ctags

How to jump to an occurrence from Vim search list

In Vim editor I opted ]I on a function (in C++ code). This presented a list, which says 'Press ENTER or type command to continue'. Now to jump to an occurrence say 6, I type 6 - but this is not working. What commands can I type in such case, and how do I jump to N occurrence from this list? Update: Actually I tried :N (eg :6) - but ...

Vim auto-generate ctags

Right now I have the following in my .vimrc: au BufWritePost *.c,*.cpp,*.h !ctags -R There are a few problems with this: It's slow -- regenerates tags for files that haven't changed since the last tag generation. I have to push the enter button again after writing the file because of an inevitable "press Enter or type command to con...

A few vim questions

So I was hoping that some old school Vim'ers could help me out. These are all separate questions and normally I would put them up each on their own but I'm not sure if that qualifies as question whoring here. Plus I think if you know enough to be asking any of these questions they will all be coming up in the near future: I have a li...

ctags best practicies

I'm working on +1M LOC C/C++ project on Solaris (remote, via VNC or SSH). I have a daily updated copy of source code on my local machine too (Windows, just for browsing code). I use VIM and ctags combo (on both Solaris and Windows) but I'm not happy with results / speed. What settings for ctags would you recommend? There are a lot of op...

How to get ctags to pick up functions in a .h file ?

I am using Exuberant Ctags 5.7. I am trying to build a tag database for CGContext.h with: tags /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h The resulting tags file has no functions included in it. It only has 75 lines for types, and enums. ...

How to use multiple tabs when tagging to a function in Vim

I use ctags with my Vim and I rely heavily on C-] and C-T to tag back and froth between various functions in my project. But if the function is in a different file, I'd like Vim to automatically open it in a new tab instead of the current tab. If I pop my tag stack using the C-T, I'd like it go back to the original tab where I pressed b...

Who calls this function?

At my last job (legacy FORTRAN 77 code), we had files of cross references that list what subroutines called other subroutines, in what files subroutines were defined, what common blocks held what variables, what subroutines included what common blocks, etc. These were then used by shell scripts that grepped the cross reference files and...

How to programmatically create/update a TAGS file with emacs?

Is there any plugin for emacs to automatically update the TAGS file in my C project (for example on buffer save or access) or create a new one if there is no TAGS file present? I am running on Windows (without Cygwin), so all the fancy shell scripting does not help. I was hoping for a native emacs solution not using any external script...

Vim and Ctags tips and tricks

I have just installed Ctags (to help with C++ development) with my Vim (or rather gVim), and would like to find out your favorite commands, macros, shortcuts, tips that go along with it... Share your best arsenal. What other Vim add-ons you would recommend for C++ on Vim development? EDIT What other add-on you would use in conjunction ...

vim, ctags, and identically named identifiers

vim + ctags works well for C projects, since C does not allow function overloading and, in general encourages manual prefixing of symbols due to rudimentary scoping facilities. In C++, functions are frequently overloaded, and overridden in subclasses. This makes vim always jump to the tag in the wrong class on "Ctrl + ]". Is there a way...

Installing Exhuberant Ctags on Windows (Vista and XP)

I want to use Exuberant Ctags on Vista (and probably the XP laptop) at work; no choice about the OS. I'm use GVim instead of the Flex Builder recommended by my co-worker, because the FB is buggy and doesn't do what GVim does, anyway. I got the zip file here. The Ctags install file says, among other things: mk_bc3.mak For MSDOS u...

cscope or ctags why choose one over the other?

I primarily use vim / gvim as an editor and am looking at using a combination of lxr ( the Linux Cross Reference ) and either cscope or ctags for exploring the kernel source. However I haven't ever used either cscope or ctags and would like to hear why one might choose one over the other taking into consideration my use of vim as a prim...

Getting ctags + Vim to work with scoping?

When I use ctags to generates tags of the STL and use those tags with Vim, it isn't aware of scoping. If I use ctrl-] it will go to the first tag that matches, even if that is incorrect. For example: std::list<int> mylist; mylist.push__back(100); if I type ctrl-] while the cursor is over push_back(100), it will take me to the bitvec...

How to find the global function?

I have a function name called setValue, used in many classes. Also, i have a global function by the same name. When i press C-], it goes to arbitrary setValue function. How do i directly jump to the global setValue function? It is really pain to use tnext every time to find if the function global. ...

Get ctags in vim to go to definition, not declaration

I'm having the problem that ctags takes me to a forward declaration allot of times instead of to the actual definition of the function. Any way to get around that? ...

How to automatically update tag file in vim?

I use vim C++ tag file for navigation using Ctrl-]. The problem is whenever some file gets modified, the links are no longer valid and I have to re-run ctags and update the tag file. Our code base is huge and it takes quite a while for generating tag file. Is there any tool which periodically updates the tag file in background? Can I c...

What are the easiest/best methods for managing your ctags tag file(s)?

I just started using ctags and greatly appreciate the tool but the way I manage my tag file is somewhat cumbersome in my opinion and very inflexible. How I currently manage my tag file: I have one monolithic tag file stored in my home folder at ~/.vim/tags When I update my code or change projects I run a script that deletes the old ta...

How to get ctags to tag loca variables and extern variables

I am using ctags 5.8 on Windows to tag a set of .c and .h files. I have one c file that has a global variable and another file that externs that variable. The tag file only has an entry for the definition of the variable. How can I get ctags to also tag the extern variable and all uses of that variable throughout the code. Similar to csc...

scope vs ctags in terms of features

I am a big fan of ctags Hence I am wondering if I have cscope, will I benefit more there two programs. Seems like the latter has the same features as ctags, namely, facilitating the finding of symbols. What are the features scope offers that can further increase my productivity with VIM? Thanks ...

Tool for code Navigation in PL/SQL

I have to study and modify a big and poorly documented codebase written in pl/sql. I use Oracle SQL Developer to navigate through it, but it become tedious because there is not a "go to declaration" nor "find usages" option so I have to go manually to the referred package to find the function or procedure I want to understand, or grep an...