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.

0
votes
2answers
31 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-...
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/...
0
votes
1answer
42 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
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 ...
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 ...
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. ...
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 ...
2
votes
1answer
507 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 ...
0
votes
1answer
68 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 ...
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 <...
3
votes
1answer
196 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 ...
1
vote
0answers
179 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 ...
0
votes
0answers
186 views

C# ctags configuration for use with vim?

I'm trying to find a good configuration for ctags with C#. I know I can use OmniSharp, but I'd like to have tags for other plugins and when OmniSharp is broken. I started with something based on this ...
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 ...
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: ...
1
vote
1answer
664 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; ... ...
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
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 ....
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 ...
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
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 ...
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 ...
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
0answers
225 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
212 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 ...
2
votes
0answers
356 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
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
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'...
0
votes
1answer
183 views

Generate ctags for QML [closed]

Is it possible to generate ctags for QML? Except for writing the parser by my own? It is not in the list of supported languages on http://ctags.sourceforge.net/ but I still hope there is a chance to ...
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 ...
0
votes
0answers
428 views

Why my easytags plugin not generating tags automatically?

I have xolox/vim-easytags and xolox/vim-misc installed. I have following configuration in vimrc: let g:easytags_dynamic_files = 1 let g:easytags_on_cursorhold = 1 let g:easytags_updatetime_min = 4000 ...
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 ...
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 ...
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:\. ...
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(...
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 + ...
4
votes
1answer
114 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 ...
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 ...
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 ...
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 */ ...
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 ...
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 ...
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 "...
3
votes
1answer
840 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) ...
0
votes
0answers
24 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 ...
0
votes
1answer
543 views

Enable completion for CSS using ctags

I have added CSS tags to my project tags file by adding this to ~/.ctags --langdef=css --langmap=css:.css --langmap=css:+.scss --langmap=css:+.sass --langmap=css:+.styl --langmap=css:+.less --regex-...
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 ...
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 ...