Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ctags]

Questions that deal with plugins or code that relies upon Exuberant Ctags for their symbol lookup.

13
votes
4answers
15k views

Can I jump to a function declaration or definition in a multiple C++ source files project?

Can I jump to a function declaration or definition in a multiple C++ source files project? Lets say I have a header file foo.hpp: int bar(); and a source file foo.cpp: #include "foo.hpp" int bar() ...
12
votes
3answers
14k views

How to jump to function call?

After generating a tags file with exuberant-ctags I can jump from a function call to its declaration with <C-]> which is pretty convenient. My question is how to do it in the other way? When my ...
10
votes
3answers
576 views

Vim, ctags and overloading

Is there a way to make vim jump to the right matching definition automatically in case of multiple definitions. Our C++ code heavily uses function overloading and vim's handling of ctags does not ...
8
votes
1answer
6k views

Why can't vim see the tags file, despite being in the same directory?

I'm in folder E:\dir\python_file.py, :pwd shows E:\dir. :e tags opens the tags file I generated with ctags -R. I've got tags set to what seems reasonable: set tags? shows set tags=./tags,tags;E:\. ...
8
votes
1answer
1k views

Exuberant Ctags - Duplicate tags problem

Here is a file -- ChipBooter.cpp -- in my project(Omit some details that are not related to this question): class ChipBooter { public: void Boot() { this->DpDetect(); } void ...
7
votes
2answers
824 views

Generate ctags for bash variables?

When I run ctags for a project written in bash, tags for functions are generated, but not for variables. e.g. if I run ctags --list-kinds=sh f functions As compared to if I run the list for the "...
7
votes
3answers
747 views

How to set up tags for Ruby, SASS, Slim and Coffescript?

I am developing main in Rails using SASS, Slim and Coffeescript. I have Exuberant Ctags installed and using tpope's setup It kind of works so at least I can move around my ruby code. But I would ...
7
votes
2answers
1k views

How to view javascript tags in vim using tagbar + jsctags + tern_for_vim + ctags_exuberant?

I'm writing javascript code using vim and I really like to have outline view for the current javascript file I'm editing. I find tagbar is the popular plugin for this purpose. And on its wiki, for ...
6
votes
1answer
1k views

Jumping from function definition tag to prototype tag

As far as I understand Vim has a built-in support for tags (ctags in this case) Now I have a common C source and C header file. The header file has void foo(void); and the source file has void foo(...
6
votes
1answer
1k views

Exuberant Ctags: CTRL-] and “:tag” went wrong

When I hit <C-]> or type :tag {indent}, vim does not jump to the first tag that matches the keyword under the cursor. Instead, it prompts me to select from multiple matches for the word. Vim ...
5
votes
3answers
4k views

Can I load different tags per project?

I'm interested in using exuberant-tags (ctags) in vim, but I use Vim for all sorts of projects so I need multiple tag files and I need vim to use the correct tag file on a per project basis. Is there ...
4
votes
1answer
115 views

Search for tags with prefixes in other language files

I'm using Exuberant Ctags to generate a tags file to use with Vim. However, in our project, we have javascript that makes remote procedure calls to the server (PHP). Functions like getUsers are thus ...
4
votes
0answers
189 views

use only “closest” tagfile to working directory (of buffer or of vim process)

I have the following configuration setting, blatantly stolen from vim-sensible. " use magical ; option if has('path_extra') setglobal tags-=./tags tags^=./tags; endif I suspect what it does is ...
4
votes
0answers
3k 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 ...
3
votes
1answer
330 views

Is there a way to hook ctag changes to git branch checkouts and pulls?

When I checkout different branches, I sometimes notice that files in the repo are not available to Vim plugins that search based on the ctags index. I don't have a definitive test that's shown the ...
3
votes
1answer
216 views

Ctags force prompt on ambiguous tag

I have a Python project where there are lots of functions with the same name in different files. Some symbols are reasonably unique and C-] will jump to the right definition. However, others are very ...
3
votes
1answer
844 views

Adding ctags for a 3rd party library

I would like to know how to generate ctags and find them with auto-complete plugins for new libraries that I install in order to 1) auto-complete for 3rd party library namespaces, classes, etc. and 2) ...
3
votes
1answer
420 views

How to select the tag to open when several tags have the same name?

One can open a file at tag with: vim -t <TAG> However, if there are two tags with the same name, e.g. two variables of the same name in two different files, then the first one is opened. How ...
3
votes
1answer
303 views

Jump to the definition in a scss file

How, in vim, can I jump to the mixin that is @includeed in a SCSS file? For example, I'd like to put the cursor over avatar below and hit some magic key in vim that'll take me to that mixin...but how?...
3
votes
1answer
200 views

vim can't process tags

I generated tags files and I'm using the following command in my .vimrc: :set tags=./tags; When I press Ctrl] I get the following error: E433: No tags file E426: tag not found: poll_wait I'm not ...
3
votes
0answers
2k views

Generating tags for python that follow imports [closed]

I'd like to be able to conveniently navigate to the file where a Python value (function/class/constant) is defined. Most of the guides I can find for using ctags with Python suggest options that aren'...
2
votes
1answer
2k views

Mapping ctags keys

How can I remap the ctags hotkeys? The main hotkeys are Ctrl-] to jump to a definition, Ctrl-t to go back, then there are also commands, for example :ts lists the definitions for the last tag. ...
2
votes
1answer
1k views

Vim, lua and ctags

I work a bit on a lua project (not small, but most of the code is not my own), and I'd like to get tags working. Current ctags contains bug, which can be fixed by getting the latest code from svn ...
2
votes
1answer
5k views

Why do I get the “tag stack empty” error when using :ptag and other commands?

I have setup a tags files in my project directory by running ctags -R ., so then when I put the cursor on a word that is a tag and use the command ], vim "jumps" to that tag. Or more correctly, vim ...
2
votes
1answer
509 views

How to get rid of “Press ENTER or type command to continue”

I'm using ctags to code C++ with vim. I set two shortcuts of ctags as below: autocmd VimEnter * silent! !eval 'ctags -R --c++-kinds=+p --fields=+iaS --extras=+q --language-force=C++ -o newtags; mv ...
2
votes
1answer
88 views

^] doesn't work if cursor is on a function name prefixed with its package in Perl

Problem: ^] doesn't work if cursor is on a function name prefixed with its package. I am using ctags and by reading the tags file generated I ensured that the sub is indexed in the tags file, like: ...
2
votes
0answers
358 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
1answer
744 views

Is it possible to get tag navigation that works with RequireJS?

Are there any features/plugins/external tools which can be used to get tag navigation that understands RequireJS imports?
1
vote
1answer
1k views

Navigation with Tagbar

I'm using Tagbar (with C++) and I would like to understand if and how it is possible to navigate the code as follow: Find all references of a variable or methods (where the variable or method is used/...
1
vote
1answer
667 views

why ctags take me to class definition rather than actual file

Background I'm using vi with a php/laravel code base.. I ran ctags and see what happens: filename: app/Http/Controllers/RetailerApproveController.php use App\Repositories\ApproveOrderRepo; ... ...
1
vote
1answer
13 views

ctags for django templates

How can I build a tag file for Django templates, in order to jump to file definitions of extends and include template tags? Here's the script PROJECT/.git/hooks/ctags-html I've tried so far #!/bin/...
1
vote
1answer
235 views

How to use ctrlp in conjunction with css and ctags

I've already configured ctags to index css files like documented here: vim-tagbar-css Also tagbar already works with configuration provided at: tagbar-css.vim Still CtrlP doesn't show any tags ...
1
vote
1answer
183 views

Configure tags to ignore noop file

Wordpress has an annoying noop file which ctags thinks defines all Wordpress functions. /** * @ignore */ function add_action() {} /** * @ignore */ function did_action() {} /** * @ignore */ ...
1
vote
2answers
1k views

Can't get Ctags working

I have a fairly small Javascript project, and when I run ctags -R it seems to generate at least some tags. I get a tags file (no extension?) in the root folder, and when I run wc -l tags it says 8214 ...
1
vote
0answers
26 views

Ctags function overload [duplicate]

I wanted to test if I can handle working on C++ projects in vim (well actually neovim). These were the core features, that I wanted to have: syntax highlighting window splitting go to definition ...
1
vote
0answers
183 views

Tag not found unless searched for

I have a very weird situation with my tags file not working as expected. My tag file is sorted case-insensitively (starts with !_TAG_FILE_SORTED\t2\t/foldcase/), and ignorecase is set. When I put my ...
1
vote
1answer
108 views

How to visually select a pattern only on current line using vimscript?

I'm trying to write a vimscript function that will allow me to map a key to select a regex match on the line my cursor is on. This will help with selecting strings for use with ctags. For example, I ...
1
vote
0answers
42 views

How to set up vim tags for JavaScript using vim-easytags

I use YouComplete plugin to do language completion but I can't seem to get tags to work for my own files/functions. I use xolox/vim-misc and xolox/vim-easytags and installed Exhuberant ctags. my ....
1
vote
0answers
205 views

IDE-alike Find Usages

I use exuberant ctags to find definitions of classes, methods and the like. Which packages find the usages of a specific tag? A git grep does not work for me as the result is way to big; many method ...
1
vote
1answer
160 views

Ctags with Rails not working

I have installed ctags (Ubuntu 16.04), added set tags=./tags; to .vimrc file, it kinda works, I can move around ruby classes and methods I have defined myself but when I want to see Rails built-in ...
1
vote
0answers
227 views

How to search through tag results from :ts?

If pressing CTRL-] matches multiple tags in Vim, it'll say "tag 1 of x or more". Typing :ts now shows you the list of x tags and allows you to choose which tag you want to jump to. When I am in this ...
1
vote
0answers
214 views

CTags Jumping to Different Project

I'm using CTags and the vim-easytags plugin. I have a Python project and a C project. In the root of the Python project, I did ctags -R . And all was good. I could jump back and forth with tags ...
1
vote
0answers
1k views

Getting tags to show in tagbar for JS file

I've been trying in vain the past few days to get Vim to recognize tags in my JS file. My problem is very similar to this other question: How to view javascript tags in vim using tagbar + jsctags + ...
0
votes
2answers
147 views

Ctags not working properly on Latin american keyboard

Right now I'm trying to configure ctags in my vim environment but I'm not sure what I'm missing. First, I installed ctags (using yaourt) and the I added this on ~/.ctags. After that, I run ctags -R ....
0
votes
1answer
2k views

Alternatives to ctags: are rtags, uctags or other alternatives better?

The problem: I've used ctags with C++ code for a while, but that has no knowledge of the code. If there are many subclasses that overwrite a certain virtual function, then on a Ctrl-] I may end up in ...
0
votes
1answer
181 views

How can I know function definition in vim for C?

I have function that prototype is void customer(void *unusedpointer, unsigned long customernum); Now, I want to call this function from another file. I write this customer( but I forget the ...
0
votes
2answers
32 views

Jumping to prototype or definition of a function using tags

This post is connected with the following one. Jumping from function definition tag to prototype tag Somehow, I did what it is mentioned there. Now, when I generate my tags file using the option --c-...
0
votes
1answer
27 views

non-word characters in tags

I have tags (generated with ctag) of the form eq:local-canonical-form Now: because of the : I cannot use eq:loc<c-x><c-]> to expand the tag. because of the : and the - I cannot use <...
0
votes
1answer
172 views

cannot generate ctags for php traits [closed]

I'm using vim, and I have used ctags and placed this in the ctags config file as per this post: --regex-php=/^[ \t]*trait[ \t]+([a-z0_9_]+)/\1/t,traits/i the problem is that I still can't find the ...
0
votes
1answer
137 views

Goto function definition of class the instance is a member of

As is displayed here: http://andrewradev.com/2011/06/08/vim-and-ctags/ We can setup ctags to allow us to enter functions and modules as they are being called. But the problem is that I want to enter ...