Robert Kusznier
Robert Kusznier

Reputation: 6941

Jump to tag (Ctrl-]) stopped working

When I position cursor over a tag name (no matter at what position inside the tag), pressing Ctrl-] should jump to that tag. It used to work before, but now it seems my Vim has some problems in identifying where tagnames start and end.

For example when I position cursor at first character of usr_09.txt and press Ctrl-] it raises error: E426: tag not found: usr_09. When I place the cursor in the middle of {ident} tag and press Ctrl-] it raises: E149: Sorry, no help for {ident}. In both cases when I visually select whole usr_09.txt and only "ident" inside {ident}, pressing Ctrl-] works fine and jumps properly to their definitions.

What could be the source of these problems?

Upvotes: 1

Views: 421

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172758

The <C-]> command uses the 'iskeyword' option to determine the characters that a tag is comprised of. It seem like you lost the . and got {} added to it.

You can reset the value to Vim's help default via

:setlocal iskeyword=!-~,^*,^\|,^\"

or retrigger processing of modelines (what Vim's help page use; see the last line) via

:doautocmd FileType

If this permanently affects the Vim help, check where it got last modified via

:verbose setlocal iskeyword?

and change / remove that wrong :set command.

Upvotes: 1

Related Questions