File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ port=$( ls /dev/tty.* | grep usb)
4
+
5
+ osascript -e \
6
+ "
7
+ tell application \" iTerm2-.9\"
8
+ tell current session of current window
9
+ set newTab to (split horizontally with default profile)
10
+ select newTab
11
+ tell newTab
12
+ write text \" screen -S arduino-serial $port \"
13
+ end tell
14
+ end tell
15
+ end tell
16
+ "
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ if !exists('g:vim_arduino_ino_cmd')
14
14
let g: vim_arduino_ino_cmd = ' ino'
15
15
endif
16
16
17
+ if ! exists (' g:vim_arduino_serial_terminal_script' )
18
+ let g: vim_arduino_serial_terminal_script = ' vim-arduino-serial'
19
+ endif
20
+
17
21
let s: helper_dir = expand (" <sfile>:h" )
18
22
19
23
function ! s: PrintStatus (result)
@@ -50,7 +54,7 @@ endfunction
50
54
"
51
55
" Returns nothing.
52
56
function ! s: ArduinoKillMonitor ()
53
- let output = system (" screen -X -S arduino-serial quit" )
57
+ let output = system (" screen -X -S" . g: vim_arduino_serial_terminal_script . " quit" )
54
58
endfunction
55
59
56
60
" Public: Compile the current pde file.
@@ -76,7 +80,7 @@ endfunction
76
80
"
77
81
" Returns nothing.
78
82
function ! ArduinoSerialMonitor ()
79
- echo system (s: helper_dir ." /vim-arduino-serial " )
83
+ echo system (s: helper_dir ." /" . g: vim_arduino_serial_terminal_script )
80
84
endfunction
81
85
82
86
if ! exists (' g:vim_arduino_map_keys' )
You can’t perform that action at this time.
0 commit comments