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

前端之家收集整理的这篇文章主要介绍了如何在Unite.vim中导航结果(候选人)?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在unite. vim搜索后,您打开一个候选人.是否有一种简单的方法可以跳转到下一个而无需再次运行搜索命令?类似的插件(ack.vim,git-grep)使用quickfix窗口,因此您可以键入:cn和:cp以跳转到下一个/上一个结果. unite.vim中有类似的东西吗?

谢谢!

我没有设法找到将结果放入quickfix或位置列表的方法,但我确信你可以扩展Unite以包含该操作.

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

  1. :UniteResume [{options}] [{buffer-name}] *:UniteResume*
  2. Reuses the unite buffer named {buffer-name} that you opened
  3. prevIoUsly. Narrowing texts or candidates are
  4. as-is. If {options} are given,context information gets
  5. overridden.
  6.  
  7. Note: Reuses the last unite buffer you used in current tab if
  8. you skip specifying {buffer-name}.

我在vimrc中以下列方式使用它:

  1. " Press <leader>ll to re-open last Unite buffer
  2. nnoremap <silent><leader>ll :<C-u>UniteResume<CR>

来自文档的另一个有用的片段:

  1. -no-quit
  2. Doesn't close unite buffer after firing an action. Unless you
  3. specify it,a unite buffer gets closed when you selected an
  4. action which is "is_quit".
  5.  
  6. -keep-focus
  7. Keep the focus on a unite buffer after firing an action.
  8. Note: This option is used with "-no-quit" option.

例如,你可以绑定

  1. nnoremap <silent><leader>lg :<C-u>Unite -no-quit -keep-focus grep<CR>

能够按下< leader> lg来浏览源文件,而无需在选择项目时关闭或取消聚焦Unite缓冲区.

猜你在找的Bash相关文章