搜索后unite.vim
,您打开一个候选人.是否有一种简单的方法可以跳转到下一个而无需再次运行搜索命令?类似的插件(ack.vim
,git-grep
)使用quickfix窗口,因此您可以键入:cn
并:cp
跳转到下一个/上一个结果.有类似的东西unite.vim
吗?
谢谢!
我没有设法找到将结果放入quickfix或位置列表的方法,但我确信你可以扩展Unite以包含该操作.
同时,Unite文档中的这一点可以帮助您重新打开刚刚打开的Unite缓冲区:
:UniteResume [{options}] [{buffer-name}] *:UniteResume*
Reuses the unite buffer named {buffer-name} that you opened
previously. Narrowing texts or candidates are
as-is. If {options} are given, context information gets
overridden.
Note: Reuses the last unite buffer you used in current tab if
you skip specifying {buffer-name}.
Run Code Online (Sandbox Code Playgroud)
我在vimrc中以下列方式使用它:
" Press <leader>ll to re-open last Unite buffer
nnoremap <silent><leader>ll :<C-u>UniteResume<CR>
Run Code Online (Sandbox Code Playgroud)
来自文档的另一个有用的片段:
-no-quit
Doesn't close unite buffer after firing an action. Unless you
specify it, a unite buffer gets closed when you selected an
action which is "is_quit".
-keep-focus
Keep the focus on a unite buffer after firing an action.
Note: This option is used with "-no-quit" option.
Run Code Online (Sandbox Code Playgroud)
例如,你可以绑定
nnoremap <silent><leader>lg :<C-u>Unite -no-quit -keep-focus grep<CR>
Run Code Online (Sandbox Code Playgroud)
能够按下<leader>lg
以查看源文件,而无需在选择项目时关闭或取消聚焦Unite缓冲区.
好消息,大家好!我创建了一个问题-724与团结回购您的要求,并已落实在一眨眼的功夫!荣耀到Shougo!
来自文档:
:UniteNext [{buffer-name}] *:UniteNext*
Do the default action with next candidates in the unite buffer
with {buffer-name}.
You can use it like |:cnext|.
:UnitePrevious [{buffer-name}] *:UnitePrevious*
Do the default action with previous candidates in the unite
buffer with {buffer-name}.
You can use it like |:cprevious|.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1530 次 |
最近记录: |