Intellij VIM模式,跳转列表(CTRL-O)不记录导航

时间:2015-03-31 16:33:30

标签: vim intellij-idea

我可以使用 Ctrl + ] 跳转到光标下单词的定义,我可以使用 Ctrl + O 跳回我来自的地方。但是,如果我做一些像控制点击某事的东西,那个跳转列表似乎并没有记录我来自哪里。 Ctrl + O 然后不会跳回我控制点击时的位置。

有没有办法确保跳转列表不会错过这个?

1 个答案:

答案 0 :(得分:1)

TAG NAVIGATION

tag stack存储用于跳转到/来自的所有标签。

  • ctrl ] 用于跟踪光标下的标记。
  • ctrl t 用于跳转到标签堆栈中的上一个条目。
  • :tag用于跳转到标记堆栈中的下一个条目。

JUMP NAVIGATION

jump list存储光标跳转到的所有位置。根据Vim的文档,在以下条件下,动作被认为是“跳跃”:

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.
  • ctrl o 用于移动光标在跳转列表中执行旧条目。
  • ctrl i 用于将光标移动到跳转列表中的较新条目。

参考

: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}