File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ " ======================================================================
2
+ "
3
+ " xterm.vim -
4
+ "
5
+ " Created by skywind on 2021/12/15
6
+ " Last Modified: 2021/12/15 06:37:16
7
+ "
8
+ " ======================================================================
9
+
10
+ " vim: set ts = 4 sw = 4 tw = 78 noet :
11
+
12
+ function ! asyncrun#runner#xterm#run (opts)
13
+ if ! executable (' xterm' )
14
+ return asyncrun#utils#errmsg (' xterm executable not find !' )
15
+ endif
16
+ let cmds = []
17
+ let cmds += [' cd ' . shellescape (getcwd ()) ]
18
+ let cmds += [a: opts .cmd]
19
+ let cmds += [' echo ""' ]
20
+ let cmds += [' read -n1 -rsp "press any key to continue ..."' ]
21
+ let text = shellescape (join (cmds, " ;" ))
22
+ let command = ' xterm '
23
+ let command .= ' -T ' . shellescape (' :AsyncRun ' . a: opts .cmd)
24
+ let command .= ' -e bash -c ' . text
25
+ call system (command . ' &' )
26
+ endfunc
27
+
28
+
You can’t perform that action at this time.
0 commit comments