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
1
vote
1answer
60 views

Smart jump to definition

I have ctags installed on my Windows machine. I have the following mappings in my vimrc file set tags=./tags;/ nnoremap <F5> :!ctags -R .<CR> nnoremap ,dd :exec("tag ".expand("<cword&...
2
votes
1answer
31 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 ...
0
votes
1answer
44 views

How to explicitly open the signature preview window when not completing?

When using <c-x><c-o>, vim opens a signature preview window which is different from the one opened when using :ptag. How to open that one when not completing like when reviewing in ...
0
votes
0answers
10 views

“tnext” command skips to next file

I'm using vim's built in helptags command to create a tags file in LaTeX. While LaTeX files are not the txt files normally used, helptags seems to work just fine, and generates an empty "tags" file ...
1
vote
0answers
60 views

Configuring ctags for a Node.js project: No tags file

I'm attempting to configure ctags for a Node.js project that I'm using, and having some difficulty getting off the ground. My goal is to have my tags file live in the .git directory. I've browsed ...
1
vote
1answer
65 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 ...
4
votes
1answer
299 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 ...
1
vote
1answer
35 views

Change definition of “under the cursor” for ctags with C++ qualifiers

When jumping to a tag it seems that ":" are ignored for the purpose of "under the cursor" (I'm assuming it's "word" "under the cursor"). For example if I want to jump to myTree::Node something I ...
1
vote
0answers
14 views

How to jump to or list a tag exclusively defined in a header?

I have a .h and a .cpp with declarations and definitions, and I'd like to be able to :tselect only the declarations, in order to see all the functions I've got that match a pattern. some_file.h: ...
0
votes
2answers
121 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 ...
16
votes
4answers
20k 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() ...
1
vote
1answer
427 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 ...
4
votes
0answers
201 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 ...
2
votes
1answer
310 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_$]+)/...
2
votes
1answer
40 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 ...
1
vote
1answer
211 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 ...
0
votes
2answers
79 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
41 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/...
11
votes
3answers
929 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 ...
3
votes
1answer
3k 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
40 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 ...
3
votes
1answer
860 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
361 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
30 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
460 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
431 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
496 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
71 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
369 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
278 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 ...
3
votes
1answer
105 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
1answer
950 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
290 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
223 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
201 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
179 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 ...
1
vote
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
298 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
319 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
302 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 ...
3
votes
0answers
443 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
286 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
231 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
561 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
465 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
7k 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
5k 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
8k 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:\. ...
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(...