Skip to content
Snippets Groups Projects
Commit f41de932 authored by Junegunn Choi's avatar Junegunn Choi
Browse files

[vim] Refocus MacVim window

parent b4a05ff2
No related branches found
No related tags found
No related merge requests found
......@@ -193,9 +193,11 @@ function! s:popd(dict)
endfunction
function! s:xterm_launcher()
return printf('xterm -T [fzf]'
\ .' -bg "\%s" -fg "\%s"'
\ .' -geometry %dx%d+%d+%d -e bash -ic %%s',
let fmt = 'xterm -T "[fzf]" -bg "\%s" -fg "\%s" -geometry %dx%d+%d+%d -e bash -ic %%s'
if has('gui_macvim')
let fmt .= '; osascript -e "tell application \"MacVim\" to activate"'
endif
return printf(fmt,
\ synIDattr(hlID("Normal"), "bg"), synIDattr(hlID("Normal"), "fg"),
\ &columns, &lines/2, getwinposx(), getwinposy())
endfunction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment