英文:
use keyboard arrow keys to navigate through the quickfix tag occurences in vim
问题
- 当我在关键字下按C-]时,有时会有多个出现,但我必须输入标签出现的编号才能跳转到其实现,就像这样:
1 F f my_function path/to/first/occurrence.c
my_function(void)
2 F f my_function path/to/second/occurrence.c
my_function(void)
输入编号并按<Enter>键(按q或留空取消):
-
我想要显示列表,并使用键盘数组导航其中的元素,我应该使用类似errorformat的东西,还是有其他简单的解决方案?
-
我想要得到:
1. my_function(void) : path/to/first/occurrence.c
2. my_function(void) : path/to/second/occurrence.c
英文:
currently when i hit C-] under a keyword, sometimes i have many occurences, but i must enter the number of the tag occurence to go to its implementation, like this:
1 F f my_function path/to/first/occurrence.c
my_function(void)
2 F f my_function path/to/second/occurrence.c
my_function(void)
Type number and <Enter> (q or empty cancels):
i want to display the list and to navigate through its elements using keyboard arrays, should i use something like errorformat, or there is an other simple solution
i want to have:
1. my_function(void) : path/to/first/occurrence.c
2. my_function(void) : path/to/second/occurrence.c
答案1
得分: 3
以下是翻译好的部分:
"The output you provided is something that is produced by :tselect
command, and this is not quickfix."
你提供的输出是由 :tselect
命令产生的,而不是快速修复。
"To list occurrences in quickfix, use :ltag
command, then open the list with :lopen
:"
要在快速修复中列出发生的情况,请使用 :ltag
命令,然后使用 :lopen
打开列表:
":ltag <some-keyword>
:lopen"
:ltag <some-keyword>
:lopen
"If you want to activate quickfix entry with arrow keys:"
如果您想要使用箭头键激活快速修复条目:
"autocmd! FileType qf autocmd! CursorMoved <buffer> :execute("norm! <CR><C-W>w")"
autocmd! FileType qf autocmd! CursorMoved <buffer> :execute("norm! <CR><C-W>w")
英文:
The output you provided is something that is produced by :tselect
command, and this is not quickfix.
To list occurrences in quickfix, use :ltag
command, then open the list with :lopen
:
:ltag <some-keyword>
:lopen
If you want to activate quickfix entry with arrow keys:
autocmd! FileType qf autocmd! CursorMoved <buffer> :execute("norm! \<CR>\<C-W>w")
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论