-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy pathexternal.vim
32 lines (27 loc) · 900 Bytes
/
external.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"======================================================================
"
" external.vim -
"
" Created by skywind on 2021/12/15
" Last Modified: 2021/12/15 06:50:05
"
"======================================================================
" vim: set ts=4 sw=4 tw=78 noet :
if has('win32') || has('win64') || has('win16') || has('win95')
finish
endif
function! asyncrun#runner#external#run(opts)
let d = ['gnome', 'xfce', 'konsole', 'xterm']
let p = get(g:, 'asyncrun_external', d)
for n in p
if n == 'gnome' && executable('gnome-terminal')
return asyncrun#runner#gnome#run(a:opts)
elseif n == 'xterm' && executable('xterm')
return asyncrun#runner#xterm#run(a:opts)
elseif n == 'konsole' && executable('konsole')
return asyncrun#runner#konsole#run(a:opts)
elseif n == 'xfce' && executable('xfce4-terminal')
return asyncrun#runner#xfce#run(a:opts)
endif
endfor
endfunc