diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-04-24 12:45:39 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-04-24 12:45:39 +0900 |
commit | 09d0ac03471db4b8b69c9d8b2dab83548e9b9c3c (patch) | |
tree | 4c4730990ca57c77d5baa168e406363f43b4632a /plugin | |
parent | 22ae7adac811ad5380718b29a1d7325bddf2cc6c (diff) |
[vim] Update default launcher for GVim (#212)
Code submitted by @lydell
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/fzf.vim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 8301cb93..85f576d9 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -22,7 +22,6 @@ " WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. let s:default_height = '40%' -let s:launcher = 'xterm -e bash -ic %s' let s:fzf_go = expand('<sfile>:h:h').'/bin/fzf' let s:install = expand('<sfile>:h:h').'/install' let s:installed = 0 @@ -202,6 +201,15 @@ function! s:popd(dict) endif endfunction +function! s:xterm_launcher() + return printf('xterm -T [fzf]' + \ .' -bg "\%s" -fg "\%s"' + \ .' -geometry %dx%d+%d+%d -e bash -ic %%s', + \ synIDattr(hlID("Normal"), "bg"), synIDattr(hlID("Normal"), "fg"), + \ &columns, &lines/2, getwinposx(), getwinposy()) +endfunction +let s:launcher = function('s:xterm_launcher') + function! s:execute(dict, command, temps) call s:pushd(a:dict) silent! !clear 2> /dev/null |