I can use Ctrl+] to jump to the definition of the word under the cursor, and I can use Ctrl+O to jump back to where I came from. But if I do something like control-click on something, that jump list does not seem to record where I came from. Ctrl+O then will not jump back to where I was when I control-clicked.
Is there a way to make sure that the jump list will not miss this?
The tag stack stores all tags used to jump to/from.
:tag
is used to jump to the next entry in the tag stack.The jump list stores all positions the cursor jumped to/from. According to Vim's documentation, motion is considered a "jump" in the following conditions:
A "jump" is one of the following commands: "'"', "`", "G", "/", "?", "n",
"N", "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and
the commands that start editing a new file.
:help tag-commands
:
g<LeftMouse> *g<LeftMouse>*
<C-LeftMouse> *<C-LeftMouse>* *CTRL-]*
CTRL-] Jump to the definition of the keyword under the
cursor. Same as ":tag {ident}", where {ident} is the
keyword under or after cursor.
When there are several matching tags for {ident}, jump
to the [count] one. When no [count] is given the
first one is jumped to. See |tag-matchlist| for
jumping to other matching tags.
{Vi: identifier after the cursor}
:help tag-stack
:
g<RightMouse> *g<RightMouse>*
<C-RightMouse> *<C-RightMouse>* *CTRL-T*
CTRL-T Jump to [count] older entry in the tag stack
(default 1). {not in Vi}
*:po* *:pop* *E555* *E556*
:[count]po[p][!] Jump to [count] older entry in tag stack (default 1).
See |tag-!| for [!]. {not in Vi}
:[count]ta[g][!] Jump to [count] newer entry in tag stack (default 1).
See |tag-!| for [!]. {not in Vi}
:help jump-motions
:
*CTRL-O*
CTRL-O Go to [count] Older cursor position in jump list
(not a motion command). {not in Vi}
{not available without the |+jumplist| feature}
<Tab> or *CTRL-I* *<Tab>*
CTRL-I Go to [count] newer cursor position in jump list
(not a motion command).
In a |quickfix-window| it takes you to the position of
the error under the cursor.
{not in Vi}
{not available without the |+jumplist| feature}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With