Stack Exchange Network

Stack Exchange network consists of 174 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 [tags]

Questions related to the use of tags files created by programs such as `ctags` to quickly locate language objects such as functions.

3
votes
1answer
22 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
26 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 ...
2
votes
1answer
62 views

difference between marks and tags?

Reading the manuals, seems to me that marks and tags are the same thing, only difference is that mark names can be [a-zA-Z] values, while tags can be alphanumeric. If I'm wrong, what is the difference ...
0
votes
0answers
42 views

tags - get c-] to place the cursor on the matching tag, rather than the start of the line

Say I have the following code (with the cursor at |): function myFunction() { } |myFunction() When I press C-] my cursor jumps to: |function myFunction() { How do I get my cursor to jump to: ...
2
votes
2answers
47 views

Make Ctrl-] give a list of matches to choose from instead of taking me to the first match

When the cursor is over a word that has multiple matches according to ctags, the Ctrl-] command on one machine I use gives me a list of matches to choose from, while on another it just populates the ...
0
votes
0answers
145 views

How to list all tags from current file?

I am using Exuberant Ctags 5.8 to generate tags for my python source on archlinux. Tag generation ctags -R . worked fine and I am able to jump through variables, class and method definitions. I am NOT ...
0
votes
0answers
18 views

How to change tselect message sryle

When tunning :tselect i get this output: # pri kind tag file 1 F F busy src/actions/app.js const busy = () => ({ type: APP_BUSY }); 2 F P ...
0
votes
0answers
43 views

Neovim and Python tags

Is there an easy way to have ctags generated in vim for the following: Everything in site-packages Everything in the current git repo Basically, an IDE like PyCharm is able to index everything in ...
0
votes
0answers
14 views

Out of Source Tags Files

Right now I place my tags files in project source directories but I'd like to place my tags files elsewhere so that I'm not adding files to project directories that I'm only reading. Is there a "right ...
4
votes
1answer
228 views

How To Use Tags In Vim For Notes

Backstory: So there is all these notes app like Evernote Onenote... but I do not want to be locked into a system and only are going to use my laptop. So I thought why not use vim to edit markdown ...
1
vote
1answer
303 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; ... ...
3
votes
1answer
184 views

How to browse tags when autochdir is set?

I like autochdir a lot, but it breaks my tag browsing, e.g.: main.c: int main(){} d/a.c: int main(){} vimrc: set nocompatible set autochdir set tagrelative set tags=tags; tags: main d/a.c ...
0
votes
1answer
1k 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
0answers
160 views

pattern to match tags in LaTeX

In LaTeX I might have something like this in my code: \ref{sec:foo:bar-baz} If I have the cursor positioned on foo and press Ctrl-] to jump to that tag, vim tries to find a tag called sec:foo:bar, ...
3
votes
0answers
61 views

links/tags inside a file

I apologize in advance for not knowing enough even to ask the question correctly. I'd like to implement something like the links in the help files (that you jump to using ctl]) in my own file, but I'...
0
votes
0answers
59 views

How to make vim automatically do a CTRL+D after jumping to a tag?

When I use CTRL+] to jump to a tag, the cursor will be placed at the center of the window. How can I make it stop at the top of the window? Now I do this by pressing CTRL+D after each jump. I was ...
2
votes
0answers
98 views

Fuzzy Find C++ function definition

I am looking for a way to fuzzy find C++ function/method definition in NeoVim. A function definition can look like this: bool Cls::func() { bool func() { bool Cls::func(unsigned some, bool argument)...
2
votes
1answer
373 views

Is it possible to clear the tag stack without jumping anywhere?

Vim keeps a stack of tags (displayable with :tags) that the user jumps to and from, similar to the jump list (displayable with :jumps). The jump list can be cleared with the :clearjumps command. This ...
2
votes
0answers
218 views

How to select unclosed tag and close it automatically?

Here is my html file already edited,there are two errors in it. <!DOCTYPE html> <html lang="zh-Hans"> <head> <meta charset="utf-8"> <link rel="stylesheet" type="...
3
votes
1answer
527 views

What does a semicolon mean in the tags option

My :set tags? option says: ./tags;,tags,./vimtags What does the semicolon after the ./tags mean? When I use vim -u NONE it is set to ./tags,tags And when I grep my packages to see what plugins ...
1
vote
0answers
124 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 ...
3
votes
1answer
94 views

Warn before exiting if tag stack not empty?

I often start editing my code at the top of a deep call chain, and use tags to jump deeper into the call chain. But when going back to where I was before, I often (out of habit) close vim, meaning to ...
6
votes
1answer
989 views

How to search multiple occurences of a vimwiki tag?

I'm using the vimwiki plugin and trying to figure out tagging with vimwiki-syntax-tags. I can add a tag :tag-example: to a vimwiki .wiki file. I can search :VimwikiSearchTags tag-example and it ...
1
vote
0answers
137 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 ...
5
votes
1answer
68 views

ctrl-] does not work for tags consist of special character ( operators in haskell )

I'm using codex for generating tags file but vim does not follow tags such as $ <$> . <*> with ctrl-] it only works if I manually call tag :tag $ Is it a bug? or there is something ...
5
votes
1answer
261 views

How to tag jump in new tab, if target file not in active tabs, else switch to exists tab?

I use the mapping below: nnoremap <silent><C-]> <C-w><C-]><C-w>T But it will open duplicate file in multiple tabs. I have two questions: Has vim built-in functions ...
4
votes
1answer
354 views

Navigate to tag in a new tab if not already opened, like `tab drop`?

What I expect from "tab-tag" navigation is the following behaviour: when need to jump to a tag: if the corresponding file is already opened in a window, navigate to it if it is not, open the buffer ...
2
votes
1answer
180 views

How to add a tags file with expand

I'm trying to add a plugin that will provide additional tags files to look up the documentation of a language: https://github.com/DanielSiepmann/phpstorm-stubs/blob/feature/add-dynamic-tags-file/...
2
votes
1answer
269 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
356 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 ...
1
vote
1answer
4k 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 ...
1
vote
1answer
400 views

How do I automatically generate a tags file with ripper-tags for ruby?

How do I get ripper-tags to automatically generate a tags file for my ruby buffers upon save?
0
votes
1answer
326 views

How to search and jump to tag without going to window of tagbar?

I have tagbar installed and for javascript files I'm using jsctags to generate tags. It's working perfectly. I can use <Enter> in tagbar to jump to a tag. But what I want is an ex command to ...
1
vote
1answer
60 views

Find a non-regular expression tag in a specific tags file

I have a tags plugin that I'm adding features to. In order to test that it is working correctly, I need to examine the tags inside a tags file. I am trying to make sure the correct tags appear in the ...
7
votes
1answer
968 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 + ...
10
votes
2answers
403 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 ...
1
vote
2answers
236 views

How to navigate to template class member via tag command

I have a C++ template class С and its member function foo(). I also have tags file generated with Exuberant Ctags. I want to access this function via the :tag command, something like this: :tag C::...
6
votes
1answer
98 views

What does “tag” mean in the context of Vim's help window?

I ran :help index to find out about key mappings and it's great, but there's one thing I don't get. At the top it says... This file contains a list of all commands for each mode, with a tag and a ...
5
votes
2answers
1k views

How to go to function or class definition in current file

Is it possible to go to a class or function definition by search? E.g. in Sublime it is possible to search the file for class and function names, and the viewport will automatically jump to the ...
4
votes
1answer
92 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 ...
5
votes
1answer
135 views

How to autocomplete tag names containing a colon?

Sometimes I want to autocomplete a tag name containing a colon, for example g:netrw_gx. I've added to the 'tags' option the location of the tags file of the main documentation (which on my machine ...
6
votes
2answers
224 views

Why is ] used for tag navigation?

Several of the commands for browsing programs with tags use ]. Is there a mnemonic for this? Why was it selected?
3
votes
1answer
643 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) ...
6
votes
2answers
2k views

Tag navigation using CTRL+] does not work with Non English keyboard on Windows

When using gVim on Windows 7 I cannot use ^] (CTRL+]) to jump to tags as described in the Vim documentation: <C-LeftMouse> *<C-LeftMouse>* *CTRL-]* CTRL-] Jump to ...
2
votes
2answers
112 views

Ctrl-] to open relevant help straight from .vimrc

I am trying to get use the help files more, and therefore I would like to make so I can just put the cursor over a setting in my .vimrc and press Ctrl-] to open the relevant section in the help files. ...
7
votes
2answers
2k views

GNU global and vim

Has anyone used GNU global with vim? I'm navigating through a large C++ code base and have some trouble figuring out how to use it. I want to use its gtags-cscope functionality but I can't figure out ...
1
vote
1answer
712 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
138 views

making vim autoclose {} tags adds a space

I added a few lines to my .vimrc to autoclose tags like [], "", '', () these all work fine but somehow the autoclosing of {} adds a space in between them and I have no idea how this comes. "auto ...
8
votes
1answer
5k 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:\. ...