Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij VIM mode, jump-list (CTRL-O) not recording navigation

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?

like image 788
Mike Avatar asked Mar 31 '15 16:03

Mike


1 Answers

TAG NAVIGATION

The tag stack stores all tags used to jump to/from.

  • ctrl] is used to follow the tag under the cursor.
  • ctrlt is used to jump to the previous entry in the tag stack.
  • :tag is used to jump to the next entry in the tag stack.

JUMP NAVIGATION

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.
  • ctrlo is used to move cursor do older entry in jump list.
  • ctrli is used to move mursor to newer entry in jump list.

REFERENCES

: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}
like image 186
Vitor Avatar answered Nov 15 '22 08:11

Vitor