diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2017-08-14 16:22:07 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-08-14 16:23:18 +0900 |
| commit | 2069bbc8b54fa77384e42274ee15af7b397af884 (patch) | |
| tree | 551d6a0b1cb690a3ae0ca856b3d13c470b0b830a /README-VIM.md | |
| parent | 053d628b532546ac0f96147792b7480686fad6b0 (diff) | |
| download | fzf-2069bbc8b54fa77384e42274ee15af7b397af884.tar.gz | |
[vim] Allow Funcref in g:fzf_action
https://github.com/junegunn/fzf.vim/issues/185
Diffstat (limited to 'README-VIM.md')
| -rw-r--r-- | README-VIM.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/README-VIM.md b/README-VIM.md index 804400d4..956a46b0 100644 --- a/README-VIM.md +++ b/README-VIM.md @@ -55,6 +55,19 @@ let g:fzf_action = { \ 'ctrl-x': 'split', \ 'ctrl-v': 'vsplit' } +" An action can be a reference to a function that processes selected lines +function! s:build_quickfix_list(lines) + call setqflist(map(copy(a:lines), '{ "filename": v:val }')) + copen + cc +endfunction + +let g:fzf_action = { + \ 'ctrl-q': function('s:build_quickfix_list'), + \ 'ctrl-t': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } + " Default fzf layout " - down / up / left / right let g:fzf_layout = { 'down': '~40%' } |
