summaryrefslogtreecommitdiff
path: root/plugin/fzf.vim
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-08-08 02:44:37 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-08-08 02:45:11 +0900
commitcc9938d4c9eed9a5e28846b3fb1fcde56d074125 (patch)
treeb84de42ed76c38b6b39c0a7ef3d28ea36cb34b47 /plugin/fzf.vim
parenta54784cd53f12ea4b8b6bf63a42dd9c86bdb3346 (diff)
downloadfzf-cc9938d4c9eed9a5e28846b3fb1fcde56d074125.tar.gz
[vim] Apply FZF_DEFAULT_{OPTS,COMMAND} when using tmux splits (#87)
Diffstat (limited to 'plugin/fzf.vim')
-rw-r--r--plugin/fzf.vim11
1 files changed, 8 insertions, 3 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index 1b7a5600..a6e3761d 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -149,10 +149,15 @@ function! s:execute(dict, command, temps)
endfunction
function! s:execute_tmux(dict, command, temps)
+ let command = a:command
+ if exists('$FZF_DEFAULT_OPTS')
+ let command = expand('FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS" ') . command
+ endif
+ if exists('$FZF_DEFAULT_COMMAND')
+ let command = expand('FZF_DEFAULT_COMMAND="$FZF_DEFAULT_COMMAND" ') . command
+ endif
if has_key(a:dict, 'dir')
- let command = 'cd '.s:escape(a:dict.dir).' && '.a:command
- else
- let command = a:command
+ let command = 'cd '.s:escape(a:dict.dir).' && '.command
endif
let splitopt = '-v'