Created
July 21, 2020 03:25
-
-
Save yuki-yano/b6d0ad4eb21038d09cd3986921685570 to your computer and use it in GitHub Desktop.
fzf command line completion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function! s:hoge() abort | |
| let cl = getcmdline() | |
| function! s:sink(line) abort closure | |
| call feedkeys(":" .. cl .. a:line, "n") | |
| endfunction | |
| function! s:run(...) abort closure | |
| call fzf#run({'source': 'ls -1', 'sink': funcref("s:sink")}) | |
| endfunction | |
| call timer_start(0, funcref("s:run")) | |
| redraw | |
| return "\<C-c>" | |
| endfunction | |
| cnoremap <expr> <Tab> <SID>hoge() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment