首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Unite.vim中导航结果(候选人)?

如何在Unite.vim中导航结果(候选人)?
EN

Stack Overflow用户
提问于 2014-02-19 10:55:26
回答 2查看 1.6K关注 0票数 6

unite.vim中搜索之后,您将打开一个候选人。是否有一种不需要再次运行搜索命令就可以跳到下一个搜索命令的简单方法?类似的插件(ack.vimgit-grep)使用quickfix窗口,因此您可以键入:cn:cp以跳转到下一个/先前的结果。在unite.vim中有类似的东西吗?

谢谢!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-02-20 08:08:35

我还没有找到将结果放入quickfix或location列表的方法,尽管我确信您可以扩展Unite以包含该操作。

同时,Unite文档中的这一点可以帮助您重新打开您最近打开的Unite缓冲区:

代码语言:javascript
复制
: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}.

我在vimrc中使用这个方法如下:

代码语言:javascript
复制
 " Press <leader>ll to re-open last Unite buffer
 nnoremap <silent><leader>ll :<C-u>UniteResume<CR>

文档中另一个有用的片段:

代码语言:javascript
复制
    -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.

例如,您可以绑定

代码语言:javascript
复制
nnoremap <silent><leader>lg :<C-u>Unite -no-quit -keep-focus grep<CR>

可以通过源文件将<leader>lg按到grep,而无需在选择项时关闭或取消对Unite缓冲区的聚焦。

票数 7
EN

Stack Overflow用户

发布于 2014-09-09 13:20:47

好消息,各位!我在Unite中创建了一个包含您的请求的第724期,它在眨眼之间就变成了实施!荣耀归寿果

从医生那里:

代码语言:javascript
复制
: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|.
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21878402

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档