From 27e26bd1ea90c54555aceecb644b390ced5d9761 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 23 Apr 2015 12:51:08 +0900 Subject: [vim] Add g:Fzf_launcher for funcrefs (#212) --- plugin/fzf.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugin') diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 28efe690..375d5ec9 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -206,8 +206,9 @@ function! s:execute(dict, command, temps) call s:pushd(a:dict) silent! !clear 2> /dev/null if has('gui_running') - let launcher = get(a:dict, 'launcher', get(g:, 'fzf_launcher', s:launcher)) - let command = printf(launcher, "'".substitute(a:command, "'", "'\"'\"'", 'g')."'") + let Launcher = get(a:dict, 'launcher', get(g:, 'Fzf_launcher', get(g:, 'fzf_launcher', s:launcher))) + let fmt = type(Launcher) == 2 ? call(Launcher, []) : Launcher + let command = printf(fmt, "'".substitute(a:command, "'", "'\"'\"'", 'g')."'") else let command = a:command endif -- cgit v1.2.3