Skip to main content

Questions tagged [ctags]

Questions that deal with symbol lookup through Ctags.

Filter by
Sorted by
Tagged with
1 vote
1 answer
46 views

How to fix this map to jump to usage/definition in a new tab?

I've had this map to be used with cscope/ctags for a while now: nnoremap <C-}> <C-w><C-]><C-w>T What it does is open the definition/usage in a new tab. This works great. Unless....
Opifex's user avatar
  • 259
1 vote
2 answers
69 views

ctags works but not for tagbar (C language)

I have a similar situation like this post but I'm working on C. I have installed ctags on my machine via ctags-nightly-build. $ which ctags /usr/local/bin/ctags $ ctags --version Universal Ctags 6.1....
HRC's user avatar
  • 61
0 votes
1 answer
49 views

How to set cursor position with tags file?

I am generating a tags file for m4 language. It works great, for example: m4_symbol k/applyforeachq.m4 /\m^m4_define\w*(\_s*«\?\zsm4_symbol\>/; m4_symbol2 k/foreach.m4 /\m^...
KamilCuk's user avatar
  • 277
1 vote
1 answer
97 views

What is CTRL-W Tab doing?

By pure coincidence, I hit CTRL+w and then Tab while editing a C++ file, and what happened is that the window was horizontally split and the new window loaded the buffer where the word under the ...
Enlico's user avatar
  • 2,276
2 votes
1 answer
101 views

Is there a ctags option for vimscript?

How to jump to a vimscript file's function definition? (I'm having a hard time searching for this particular functionality, then getting results for using ctags in Vim, and not sure how to phrase that ...
nymo's user avatar
  • 141
2 votes
1 answer
83 views

PHP class name collision with ctags

I have the following php file: namespace App\Validator; use Symfony\Component\Validator\Constraint; // #1 class MyValidator // ... { public function validate(Constraint /* #2 */ $constraint): ...
Nicolas Appriou's user avatar
1 vote
1 answer
131 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 ...
Jorge D's user avatar
  • 41
2 votes
1 answer
462 views

What is the difference between `tag` and `tags` command?

I've recently come across the concept of tags in vim. I run ctags on a file and it generates tags for that file. When I try to access those tags I use the tag command which basically provides a list ...
nikinbaidar's user avatar
0 votes
1 answer
264 views

Taglist isn't reading custom Markdown tags

The plugin Taglist is showing tags perfectly for my python but not for my markdown files. There is a MCVE on github. I have two files. test1.py is: def one(): print("one") def two(): ...
Joe's user avatar
  • 287
1 vote
1 answer
862 views

ctags cannot find the definition of a local variable in a c function

I use ctags -R * to generate tag files. I have tried exuberant-ctags and universal-ctags. In a c function, I define a local variable, but ctags cannot find the definition of the local variable. Is ...
Tokubara's user avatar
  • 177
2 votes
1 answer
651 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 ...
JZ67's user avatar
  • 65
0 votes
3 answers
327 views

Is there a way to have the same tag name in ctags?

I'm looking to write foos,bars,bazs by using a custom language in ctags. It works fine, I can jump to the tag but I'm only allowed to have one unique tag name. I would like to be able to jump through ...
ritchie's user avatar
  • 263
1 vote
0 answers
186 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 ...
abbood's user avatar
  • 753
3 votes
1 answer
171 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 ...
First User's user avatar
2 votes
1 answer
3k views

Vim function : how to expand vim variable in shell command?

I'm trying to write a vim function to update ctags and cscope databases. I'm trying to save the vim variable projectRoot in environment variable then expand this enviroment variable in the find ...
Salahuddin Ahmed's user avatar
1 vote
1 answer
394 views

ctags: can you ignore matching tags for a specific file extension?

small background: I have a code base with multiple languages: C, C++, Python, Sh, Makefile, Perl. I configure my ctags generation right now to just do: C,C++,Python,Sh. I point vim at the ctags tag ...
Trevor Boyd Smith's user avatar
1 vote
1 answer
2k 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 --...
drinker's user avatar
  • 41
1 vote
2 answers
785 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'...
Bapi's user avatar
  • 133
1 vote
2 answers
540 views

<C-x><C-o> "Pattern not found" even with a Ctags file (C/C++)

<C-x><C-o> returns Pattern not found in C/C++ files even with a ctags file. It used to work and I haven't made any configuration/plugin changes that I know of Starting vim with vim -u ...
hopibel's user avatar
  • 11
2 votes
1 answer
718 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 ...
Yukun Du's user avatar
0 votes
0 answers
13 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 ...
The Pompitous of Love's user avatar
3 votes
3 answers
1k 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&...
Salahuddin Ahmed's user avatar
1 vote
2 answers
474 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 ...
bkdm's user avatar
  • 176
1 vote
0 answers
391 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 ...
Belgabad's user avatar
  • 111
2 votes
1 answer
1k 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 ...
ipatch's user avatar
  • 1,979
1 vote
0 answers
88 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: ...
TankorSmash's user avatar
1 vote
1 answer
58 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 ...
kabanus's user avatar
  • 163
1 vote
2 answers
1k 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 ...
ThoseKind's user avatar
  • 239
2 votes
1 answer
1k 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 ...
John's user avatar
  • 123
5 votes
0 answers
562 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 ...
Davis Owen's user avatar
2 votes
1 answer
244 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 ...
sherlock's user avatar
  • 121
0 votes
2 answers
732 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-...
Javier Galan's user avatar
2 votes
1 answer
149 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/...
Adrien Lemaire's user avatar
2 votes
1 answer
1k 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_$]+)/...
abbood's user avatar
  • 753
1 vote
0 answers
71 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 ...
user avatar
4 votes
1 answer
2k 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 ...
Yves's user avatar
  • 1,023
1 vote
1 answer
2k 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 ...
Yves's user avatar
  • 1,023
0 votes
1 answer
97 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 <...
Jan's user avatar
  • 212
3 votes
1 answer
1k 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 ...
stdcall's user avatar
  • 1,069
1 vote
0 answers
682 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 ...
LambdaBeta's user avatar
1 vote
1 answer
620 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 ...
Nathan's user avatar
  • 165
1 vote
0 answers
133 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 ....
CodeCrack's user avatar
  • 111
3 votes
0 answers
1k 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 ...
idbrii's user avatar
  • 763
1 vote
0 answers
757 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 ...
jonas-schulze's user avatar
1 vote
1 answer
446 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 ...
jedi's user avatar
  • 131
3 votes
1 answer
122 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: ...
Sunny Pun's user avatar
  • 492
2 votes
1 answer
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; ... ...
abbood's user avatar
  • 753
0 votes
1 answer
476 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 ...
abbood's user avatar
  • 753
0 votes
2 answers
275 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 ....
sant016's user avatar
  • 103
4 votes
1 answer
585 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 ...
Greg Nisbet's user avatar
  • 1,899