Questions tagged [ctags]

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

Filter by
Sorted by
Tagged with
20
votes
5answers
23k 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 ...
18
votes
4answers
25k 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() ...
11
votes
3answers
1k 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 ...
10
votes
1answer
2k 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 ...
8
votes
1answer
10k 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
3answers
1k 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
1answer
2k 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(...
7
votes
3answers
885 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
2k 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
3answers
6k 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 ...
5
votes
1answer
2k 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
0answers
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 ...
4
votes
1answer
2k 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) ...
4
votes
1answer
1k 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 ...
4
votes
1answer
163 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
1answer
433 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
390 views

How to have gutentags build tags from the .git folder in a repository?

I want to have my tags file generated from gutentags/ctags to be in the .git folder, because I am working on a project with other people where I don't want to edit the .gitignore file. So, I have ...
3
votes
1answer
4k 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. ...
3
votes
1answer
534 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
349 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
9k 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 ...
3
votes
1answer
455 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
76 views

ctags vs GNU id-tools?

I stumbled upon mkid tools in tips.txt and tried it out (on C code). In terms of navigating to definitions, I thought it was identical to using ctags except for the fact that the ID file (generated by ...
3
votes
1answer
716 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
882 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
1answer
113 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: ...
3
votes
0answers
472 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. ...
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
1k 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; ... ...
2
votes
1answer
2k 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
472 views

navigating markdown documents using ctags with vim and neovim

I work on my dotfiles periodically throughout my day work or non work related (that bonsai tree that's never done). I've written a couple of markdown documents that have become rather large to ...
2
votes
1answer
278 views

Jump to definition (CTRL-]) slow on windows

I have a big source code base on both Mac and Windows on which I work on this with MacVim/NeoVim. When using CTRL-] to search tag through a 1.6G tags file, I got immediate result with MacVim while ...
2
votes
1answer
117 views

Is it possible to have tag suggestion in ctags while searching for a tag?

I am using exuberent-ctags with vim 8.0. While searching for a tag with a long name, I'd like to have a list of suggestions having the typed string as the sub-string when I use the :ta command. What I ...
2
votes
1answer
684 views

ctags works but not for tagbar

I'm working with typescript now, and I got this in my ~/.ctags file: --langdef=typescript --langmap=typescript:.ts --regex-typescript=/^[ \t]*(export[ \t]+([a-z]+[ \t]+)?)?class[ \t]+([a-zA-Z0-9_$]+)/...
1
vote
1answer
863 views

Plugin to display a smarter method tag list

Note this may be a duplicate, but I couldn't really find an answer. From a C++ perspective: With universal ctags on, doing a C-] on top of a method call presents you with a tag list matching the ...
1
vote
2answers
406 views

quickfix Menu Usage With :tselect and :vimgrep

I am currently using the following mapping to search for knows tags: nnoremap <expr> <Leader>t "<ESC>:tselect /" . input("") . "<ESC>" I also use this mapping to grep all ...
1
vote
1answer
798 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
2k 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
2answers
167 views

How to run external commands in vim from windows OS?

I learn vim in the Debian distro. In debian I can run commands like 'ls', 'cd', 'curl' etc directly from vim via power of '!' this sign. But now I am in windows because of the driver issue. But I don'...
1
vote
1answer
3k 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 ...
1
vote
1answer
35 views

Conflict between autocompletion (via ctags) and the `find` command?

I am using Vim 8.2 on Windows 10. Autocompletion (using CTRL+N or CTRL+P) upon creating the tags file using ctags.exe works fine for me. Now I want to use the find command in vim to quickly opening ...
1
vote
1answer
87 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 ...
1
vote
1answer
303 views

Ctags doesn't find tag existing in tag file

I've been having some troubles with setting up ctags and vim with a large project I'm new at. The tag files seem to be generating properly (specific options are: --sort=foldcase --recurse --extra=+q --...
1
vote
1answer
82 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
1k views

How to print a message after `autocmd` is done

I'm using ctags to generate tag file so that I can jump to declaration or to definition while working with C/C++ project. To make ctags work automatically while entering vim, I add such a line in my ...
1
vote
1answer
448 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
1answer
356 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
267 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
3answers
3k 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
122 views

How to make FZF BTags command separate public from private methods

I spend most of my time doing peer reviews and working on higher level architecture decisions when it comes to the code of my team. So I find the tools that visualizes the code at a higher level to be ...