Skip to content
Myr

[vim] Add g:Fzf_launcher for funcrefs (#212)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 305ec3b · Browse files · 2 files+5 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−3 removed

  • other:+5 added−3 removed

2 files+5 added−3 removed

modified:plugin/fzf.vim+3 added-2 removed
204 unmodified lines
205function! s:execute(dict, command, temps)206 call s:pushd(a:dict)207 silent! !clear 2> /dev/null208 if has('gui_running')209 let launcher = get(a:dict, 'launcher', get(g:, 'fzf_launcher', s:launcher))210 let command = printf(launcher, "'".substitute(a:command, "'", "'\"'\"'", 'g')."'")209 let Launcher = get(a:dict, 'launcher', get(g:, 'Fzf_launcher', get(g:, 'fzf_launcher', s:launcher)))210 let fmt = type(Launcher) == 2 ? call(Launcher, []) : Launcher211 let command = printf(fmt, "'".substitute(a:command, "'", "'\"'\"'", 'g')."'")212 else213 let command = a:command214 endif215 execute 'silent !'.command
146 unmodified lines
modified:README.md+2 added-1 removed
292 unmodified lines
293| `options` | string | Options to fzf |294| `dir` | string | Working directory |295| `up`/`down`/`left`/`right` | number/string | Use tmux pane with the given size (e.g. `20`, `50%`) |296| `window` (*Neovim only*) | string | Command to open fzf window (e.g. `vertical aboveleft 30new`) |297| `launcher` | string | External terminal emulator to start fzf with (Only used in GVim) |297| `launcher` | string | External terminal emulator to start fzf with (GVim only) |298| `launcher` | funcref | Function for generating `launcher` string (GVim only) |299300_However on Neovim `fzf#run` is asynchronous and does not return values so you301should use `sink` or `sink*` to process the output from fzf._302
131 unmodified lines