Skip to main content
10 votes
Accepted

How to search multiple occurences of a vimwiki tag?

The results from :VimwikiSearchTags are populated in the location-list window, so you can navigate using :lnext and :lprevious, or you can check all the results using :lopen. To be honest, despite I ...
mMontu's user avatar
  • 6,670
10 votes
Accepted

How can I close the quickfix window and go back to the file I was editing

To close the quickfix window, you use :cclose, as @statox mentioned in the comments. This won't affect which code buffer you're viewing, though. Vim doesn't distinguish between the buffer you were ...
Rich's user avatar
  • 32.2k
7 votes

How do I navigate to topics in Vim's documentation?

-0.1 make notes about vim in a file. Use it as reference and container. fast way to find vim help of key | :cmd | 'option' | etc :h gi or :h g; for gi or g; in normal mode :h ^i for Ctrl-i in normal ...
qeatzy's user avatar
  • 968
7 votes
Accepted

Jumping from function definition tag to prototype tag

Okay I've done it: It all has to do with ctags: First create two files called foo.c and foo.h to test it: In foo.h write down: int bar(void); In foo.c write down: int bar(void) { /* */ } And in ...
hgiesel's user avatar
  • 1,944
7 votes
Accepted

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

ctrl-] uses the word under the cursor, (as opposed to a WORD) which means that any punctuation is excluded. From :h word: A word consists of a sequence of letters, digits and underscores, or a ...
Tumbler41's user avatar
  • 7,756
7 votes
Accepted

What does a semicolon mean in the tags option

The answer for this is :h file-searching: 11. File Searching file-searching {not available when compiled without the |+path_extra| feature} The file searching ...
muru's user avatar
  • 25k
7 votes
Accepted

why ctags take me to class definition rather than actual file

What's happening When there are multiple matches for a tag, Vim uses the following list of priorities (listed at :help tag-priority). "FSC" A full matching static tag for the current file. "...
Rich's user avatar
  • 32.2k
5 votes

How to browse tags when autochdir is set?

Workaround Since the problem happens because of relative paths in tags file, it will go away if there are only absolute paths. ctags has --tag-relative option, which: Indicates that the file paths ...
xaizek's user avatar
  • 1,798
5 votes

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

Put this in your vimrc: map <C-]> :TabExpand 1<CR> command -nargs=1 TabExpand call HandleTabTagExpand( <f-args> ) let s:commentchar = """ function HandleTabTagExpand(tagnumber) ...
Tim's user avatar
  • 436
5 votes
Accepted

difference between marks and tags?

Both specify certain points in a file and give you commands to jump there and as such they are the same. But marks are created by vim. Either explicitly by hand with m or automatically by vim (for ...
Lucas's user avatar
  • 1,629
5 votes

How do I navigate to topics in Vim's documentation?

Regarding the question: how to follow hyperlinks? With the mouse cursor over the desired link do Ctrl + ]. Ctrl + t will bring you back to the initial outline with its list of links, where you can ...
alec's user avatar
  • 825
5 votes
Accepted

Why do I get the "tag stack empty" error when using :ptag and other commands?

First, the command to jump to a tag is <C-]>, not ]. Second, :ptag doesn't care about the word under your cursor. It works just like :tag but uses the preview window instead of jumping directly ...
romainl's user avatar
  • 41.2k
5 votes
Accepted

quickfix Menu Usage With :tselect and :vimgrep

You can use the ":ltag" command which adds the matching tags to the location list for the current window. You can then use the location list commands to browse the matches. BTW, the location list ...
Yegappan Lakshmanan's user avatar
5 votes

How do I jump to tags instead of lines?

There are probably better ways but you could the help functionality as long as the filetype being help is ok. I basically use it to write down things I'm learning as I keep learning how to use gvim, ...
Steve's user avatar
  • 276
4 votes

Vim, ctags and overloading

The documentation (:help ctrl-]) says: When there are several matching tags for {ident}, jump to the [count] one. When no [count] is given the first one is jumped to. g] may not be what you are ...
romainl's user avatar
  • 41.2k
4 votes
Accepted

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

Disclaimer: I don't have ripper-tags installed, this is my best guess on browsing the documentation. In the documentation it says that the typical usage is: ripper-tags -R --exclude=vendor This ...
Tumbler41's user avatar
  • 7,756
4 votes

Suppress "Using tag with different case" message

According to my reading of the code you've found the only way to avoid that stuff: use of silent. This appends the warning...nothing can prevent it except for disabling ignorecase et al... if (ic) ...
B Layer's user avatar
  • 20k
4 votes
Accepted

How do you :tag: every word of a line using substitution?

While on the line in question: :s/\w\+/:&:/g Breakdown \w\+ will match 1 or more word characters ([0-9A-Za-z_]). & has a special meaning in a replacement, depending on the value of 'magic' (...
Jake Grossman's user avatar
3 votes
Accepted

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

You can use :set cscopetag to get that effect. When this setting is enabled, it uses :cstag whenever :tag, <C-]>, or vim -t is used. :cstag will use a cscope database if present, but if not it ...
jamessan's user avatar
  • 11.1k
3 votes

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

Has vim built-in functions which can return a list of tab files? like :tabs command You'll have to do some parsing, but you can use let myVar = execute('tabs') for this. How to get tag's filename ...
Tumbler41's user avatar
  • 7,756
3 votes
Accepted

Warn before exiting if tag stack not empty?

There's no built-in option, but you can implement a custom command that either :quits or :pops the last item from the tag stack. command! QuitOrPop try | pop | catch /^Vim\%((\a\+)\)\=:E\%(73\|555\):...
Ingo Karkat's user avatar
  • 17.9k
3 votes
Accepted

How to select the tag to open when several tags have the same name?

You can use :tnext to jump to the next matching tag. If you have four tags foo, these commands will let you jump to each tag sequentially: $ vim -t foo :tn :tn :tn You can use :tp[revious] to jump ...
romainl's user avatar
  • 41.2k
3 votes
Accepted

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

Vim comes with a complete set of commands and options for using tags. You can read all about it in :help tags (the generic stuff) and :help ctags (the ctags-specific stuff that also applies to jsctags)...
romainl's user avatar
  • 41.2k
3 votes

How to navigate to template class member via tag command

There are (universal?) tags options that can request functions names to be prefixed by full scope (namespace + class). Unfortunately, I can't remember which one it is among: --c++-kinds=+f --fields=+...
Luc Hermitte's user avatar
  • 17.5k
3 votes

Bidirectional tag stack movement with cscope in vim

Ensure setting the cscope using the following in your ~/.vimrc file: set cscopetag set cst set csto=0 set tags=./tags,tags;/ cs add cscope.out Once it is done, re-login into the terminal to run ...
Vicky's user avatar
  • 131
3 votes

Why is ] used for tag navigation?

vi was designed for use with glass terminals, the protocols of which often use many of the control-x commands down at the low end of ASCII. Others were reassigned in the move from paper terminals, ...
Warren Young's user avatar
3 votes
Accepted

Open quickfix Window Only, Don't Jump To First Result

The jump is caused by the :ltag command, not by :lopen. Unfortunately, though that command takes an optional [!], it's meaning is different than that to :make and friends, which can suppress the jump ...
Ingo Karkat's user avatar
  • 17.9k
3 votes

How do I jump to tags instead of lines?

I think with vim-wiki you can set anchors (from the help): Anchors~ A wikilink, interwiki link or diary link can be followed by a '#' and the name of an anchor. When opening a link, the cursor ...
D. Ben Knoble's user avatar
  • 26.6k
3 votes
Accepted

Jump to definition (CTRL-]) slow on windows

search tag through a 1.6G tags file, I got immediate result with MacVim while surfering about 5s to get search result from NeoVim. From the symptoms you describe, it seems to me that you're getting ...
filbranden's user avatar
  • 29k
3 votes

Code-review: persistent tag-stack display

Really, your solution seems fine so these are nit picks. However it does use a few techniques that can sometimes cause editor performance issues and "jank" (weird glitches) so I'll mention ...
Mass's user avatar
  • 14.2k

Only top scored, non community-wiki answers of a minimum length are eligible