All Questions

Tagged with
Filter by
Sorted by
Tagged with
485 votes
15 answers
319k views

Vim and Ctags tips and tricks [closed]

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 ...
user avatar
148 votes
4 answers
79k views

cscope or ctags why choose one over the other? [closed]

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 ...
Robert S. Barnes's user avatar
72 votes
5 answers
39k views

Vim: Difficulty setting up ctags. Source in subdirectories don't see tags file in project root

I'm trying to get setup with (exuberant) ctags on Vim today and am having difficulty getting it to work properly. I generate my ctags file on the command line with with: cd myproj ctags -R This puts ...
Thomas's user avatar
  • 5,776
71 votes
4 answers
29k views

How to navigate multiple ctags matches in Vim?

I'm using Ctrl-] in Vim to navigate using Ctags. How do I navigate to alternate file if there are multiple matches? Ex. something.publish in a codebase containing multiple occurrences of publish: ...
Sathish's user avatar
  • 20.9k
63 votes
6 answers
40k views

How to exclude multiple directories with Exuberant ctags?

I have looked and tried to use exuberant ctags with no luck with what I want to do. I am on a Mac trying to work in a project where I want to exclude such directories as .git, node_modules, test, etc. ...
pertrai1's user avatar
  • 4,218
57 votes
12 answers
36k views

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 ...
cdleary's user avatar
  • 70.6k
56 votes
10 answers
46k views

Get ctags in vim to go to definition, not declaration

I'm having the problem that ctags in vim/gvim takes me to a forward declaration a lot of times instead of to the actual definition of the function. Any way to get around that?
Robert S. Barnes's user avatar
54 votes
3 answers
34k views

Exuberant Ctags on Mac

I'm currently using vim for my PHP development. A few weeks ago I bought myself a mac, and wanted to re-generate my tags for a new Zend Framework version. I used the following script in the past (...
Presnus's user avatar
  • 723
41 votes
5 answers
23k views

Is there an alternative to ctags that works better? [closed]

I have just discovered the taglist plugin for vim, and read about how to use it with ctags. However, disappointingly ctags is a very simple parser. Is there an alternative that is more complete? ...
Doug's user avatar
  • 34.1k
39 votes
4 answers
58k views

Vim - ctags: tag not found

I want to use Ctags for a Zend framework project. I executed this command : ctags -R ./* ../ZendFramework/*to create a list of tags, but the problem is when I press Ctrl-] on a class or method I get ...
user16948's user avatar
  • 4,901
38 votes
8 answers
37k views

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 ...
Canopus's user avatar
  • 7,381
35 votes
4 answers
21k views

how to make vim ctags works for modern javascript

I am using vim and ctags to get taglist. but for javascript, it does not works for this convention MyClass.extend({ xxx: function(){ }, ... }) MyClass.prototype = { method : function(){ } ...
guilin 桂林's user avatar
30 votes
4 answers
18k views

Vim and Ctags: Ignoring certain files while generating tags

I have a folder llvm2.9 in which i ran this command. $> ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ This was indexing methods in *.html files also which were ...
excray's user avatar
  • 2,778
29 votes
7 answers
15k views

Using Macvim over ssh

My project involves working on a large codebase on a remote server. I'm constantly editing multiple files, so scp'ing files back an forth is not possible. I've got my local Macvim setup just the way ...
skeletalmonkey's user avatar
26 votes
3 answers
62k views

VIM set ctags in .vimrc

I have my projects in /srv/http/dev folder. I generated ctags file for one project: $ ctags -R --languages=php . Now I set ctags path: :set tags=/srv/http/dev/proj/tags And it's working fine. But ...
Dmitry Teplyakov's user avatar
25 votes
2 answers
4k views

How do I generate ctags for CoffeeScript?

Is it possible to generate a ctags file for CoffeeScript in vim/MacVim?
Darren Newton's user avatar
25 votes
2 answers
6k views

VIM: More precise C/C++ code parsing solutions?

Pre: I've been working in VIM for like a year already. Lots of great things: combinations, scripts. Whenever I'm editing something in a different editor, I feel sluggish/uncomfortable without VIM's ...
Andrew_Lvov's user avatar
  • 4,658
25 votes
4 answers
2k views

ctags ignore lists for libc6, libstdc++ and boost

I use ctags with vim and the OmniCppComplete plugin. Currently when generating my tags I do it individually for each library. For libc6 I use the following list of tokens / macros in a file named ...
Robert S. Barnes's user avatar
24 votes
3 answers
11k views

Reload tags file Vim

How do i reload the tags file from within Vim? Is a restart necessary?
asymmetric's user avatar
  • 3,860
22 votes
7 answers
28k views

Taglist: Exuberant ctags not found in PATH

This morning, I started getting that message when I attempt to open a file in Vim. Vim is my editor of choice for config files, git commit messages and the like, but is not my day to day code editor. ...
Rob Wilkerson's user avatar
22 votes
4 answers
7k views

Generating a reasonable ctags database for Boost

I'm running Ubuntu 8.04 and I ran the command: $ ctags -R --c++-kinds=+p --fields=+iaS --extra=+q -f ~/.vim/tags/stdlibcpp /usr/include/c++/4.2.4/ to generate a ctags database for the standard C++ ...
Robert S. Barnes's user avatar
21 votes
4 answers
6k views

Jumping back to a previously opened file in Vim

While using Vim I'll sometimes want to look at a function definition or a struct definition, so I'll use C-] to jump to it. However, there are a few problems I run into. First off, I don't know how to ...
Alex's user avatar
  • 15.1k
20 votes
5 answers
7k views

Do you know an alternative ctags generator for Ruby

Exumerant Ctags does not work well with Ruby, you can see there are many hacks in the ruby.c code and basically it fails recognizing many cases. One of the most important is this bit: class ...
lzap's user avatar
  • 16.9k
20 votes
7 answers
4k views

Exuberant Ctags with R

Is there any documented use of ctags with R? Would this be useful? Would it be difficult to implement? Specifically, I've just started using Vim. It would be cool to be able to write an R function in ...
Jeromy Anglim's user avatar
19 votes
1 answer
19k views

How to use Ctags to list all the references of a symbol(tag) in vim?

Can I list all the references of a symbol in vim using Ctags? like the 'Find References' In some GUI IDE. The Ctag tutorial just tell how to locate the definition of a symbol ,not all the usages.
Shaobo Zi's user avatar
  • 709
19 votes
5 answers
3k views

Vim omnicompletion for C#

I was wondering if there is any tool like OmniCppComplete for C# (method signature shown in the abbreviation is what I'm most interested in). I've searched everywhere with not avail. Update: I'll be ...
Jean-Pierre Chauvel's user avatar
18 votes
4 answers
3k views

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 ...
Alex B's user avatar
  • 83.7k
17 votes
9 answers
9k views

Alternatives to Ctags/Cscope with Objective-c?

Are there any alternatives to ctags and cscope with Objective-c support. This does pertain to cocoa development, so inevitably it seems I will be using Xcode (and probably should). I was just ...
esiegel's user avatar
  • 1,783
17 votes
4 answers
6k views

Vim and ctags: tag filenames

Is it possible to have ctags generate tags for filenames as well? I would like to be able to jump to a file given a filename. :find seems to be awfully slow compare to tags...
Andy's user avatar
  • 171
16 votes
6 answers
34k views

vim cannot connect to cscope database

I have opensuse 11.4 installed. Vim is version 7. Now I normally use it to browse the linux kernel source. So I generated the cscope database inside a directory within my home folder i.e. /home/...
Aijaz Baig's user avatar
16 votes
1 answer
6k views

Should I use Universal-ctags?

I've used Darren Hiebert’s Exuberant-ctags for a quite a while; it is an essential part of my vim toolbox. I tag python, Java and C code (I also use cscope). Recently, I've read that I should be ...
gregory's user avatar
  • 11.8k
15 votes
6 answers
5k views

More accurate alternative/workaround to ctags/Cscope for PHP?

I know that it is possible to use Ctrl+] to jump to a definition in Vim and this can work in conjunction whith either ctags or Cscope. I am looking for a more accurate alternative to both ctags and ...
still_dreaming_1's user avatar
14 votes
6 answers
4k views

How can I make vim's taglist plugin show useful information for javascript?

I've recently abandoned mouse-driven, platform-specific GUI editors and committed entirely to vim. The experience so far has been fantastic, but I'm stuck when it comes to Javascript. The ever-...
Tom Frost's user avatar
  • 1,015
14 votes
1 answer
3k views

Create tags file for latex for labels and bib items

I'm using ctags to create a tags file for use in Vim, so that I can jump to definitions of labels and citations. However, I have two problems: ctags includes \ref in the tags file, so when I hit jump ...
daniel kullmann's user avatar
14 votes
1 answer
23k views

ctags, vim and python code

I generate ctags with the following command ctags -R --fields=+l --languages=python --python-kinds=-iv -f ./tags apps/employees/models.py and this is my code from django.contrib.auth.models import ...
DmitrySemenov's user avatar
14 votes
3 answers
3k views

Vim - run ctags on current python site-packages

This is what I need - have a key that will create ctags of my python site-packages. I have this command, that will print the site-packages path: !python -c "from distutils.sysconfig import ...
ak.'s user avatar
  • 3,369
13 votes
6 answers
4k views

Regenerate ctags in vim using RVM

I have the following code in my .vimrc: map <Leader>rt :!ctags --extra=+f -R *<CR><CR> This generates ctags for my current directory. I'm using RVM, I'm working on different ...
astropanic's user avatar
  • 10.9k
13 votes
3 answers
7k views

How to fix duplicate cscope ? is it a better way?

It is several years I am programming with vim and I used ctags. I am working with a reasonably large C/C++ package and I need to find definition of functions. I usually use grep + ctags. Recently I ...
Aznaveh's user avatar
  • 558
13 votes
4 answers
4k views

ctags+taglist for .cu (CUDA) files

I use the vim editor (on Ubuntu). Recently, I have been working with large cuda projects and hence would like to utilize the ctags utility for code browsing. The list of supported languages for ...
Abhinav's user avatar
  • 1,902
13 votes
3 answers
4k views

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 ...
Amjith's user avatar
  • 23.2k
12 votes
2 answers
8k views

Jump to definition in new tab

What i'm looking for is the following behaviour: ^]Should open the definition below the cursor in a new tab instead of a new buffer and reuse already open tabs ^OShould switch back to the previous ...
barbaz's user avatar
  • 1,702
11 votes
3 answers
17k views

Tag navigation in vim

With cscope integrated Vim, I can navigate back using the ctrl-T and see the current tag stack position using :tags . But how do I go forward in the stack? The only thing I could find from the man ...
vpillai's user avatar
  • 373
11 votes
2 answers
2k views

Vim + OmniCppComplete: Completing on Class Members which are STL containers

Completion on class members which are STL containers is failing. Completion on local objects which are STL containers works fine. For example, given the following files: // foo.h #include <...
Robert S. Barnes's user avatar
10 votes
5 answers
21k views

How to get ctags working inside vim

I'm new to vim and wanted to get ctags integration working so I can more easily navigate a large java project. I've pulled down the zip from source forge and extracted it but from here I'm not sure ...
JimmyBond's user avatar
  • 461
10 votes
1 answer
4k views

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 ...
vehomzzz's user avatar
  • 43.7k
10 votes
2 answers
6k views

How to cause ctags to show tag definition on vertical split without opening a new split?

I am using ctags and I added map <C-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR> to my vimrc. However, this opens a new vertical split everytime. Is there a way to show tag ...
user1004985's user avatar
  • 2,733
10 votes
1 answer
7k views

Can ctags be made to follow #include directives?

I am trying to create a target in my Makefile to automatically create a tags file using ctags. I have a list of source files (.cpp files) but I don't have a list of all the header files (I use g++ -...
Lee Netherton's user avatar
9 votes
4 answers
3k views

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 ...
Trevor Boyd Smith's user avatar
9 votes
1 answer
3k views

use :tjump instead of :tag vim on pressing ctrl-]

in vim, when i press ctrl-] 1) the usual behavior: it goes to the first matching tag with the word under the cursor, after that we need to do :tjump separately to see a list of all matching tags and ...
suppie's user avatar
  • 1,097
9 votes
2 answers
5k views

ctags for shell scripts without extensions

I'm working on a Bash script that is designed to be run 'as a tool' so has a name without an extension and a #!/usr/bin/bash line at the top. My script has a number of functions, so it would be nice ...
David Waller's user avatar
  • 3,107

1
2 3 4 5
9