How to transfer results (candidates) to Unite.vim?

After searching in unite.vim you will open the candidate. Is there an easy way to move on to the next one without having to run the search command again? Similar plugins ( ack.vim , git-grep ) use the quick fix window, so you can type :cn and :cp to go to the next / previous results. Is there something similar in unite.vim ?

Thanks!

+6
source share
2 answers

I was unable to find a way to put the results in quick or local search lists, although I'm sure you can extend Unite to include this action.

Meanwhile, this short excerpt from the Unite documentation can help you reopen the recently opened Unite buffer:

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

I use this as follows in my vimrc:

  " Press <leader>ll to re-open last Unite buffer nnoremap <silent><leader>ll :<Cu>UniteResume<CR> 

Another useful snippet from the docs:

  -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. 

For example, you can snap

 nnoremap <silent><leader>lg :<Cu>Unite -no-quit -keep-focus grep<CR> 

To press <leader>lg on grep through the source files without closing or defocusing the Unite buffer when an item is selected.

+7
source
Good news, everyone! I created issue-724 with your request in the Unite repository and was implemented in no time! Glory to Shougo !

From the docs:

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

All Articles