Skip to content

Commit 4d94c67

Browse files
committed
removing vim-arduino-ino bash script and not launching serial window if compiling fails
1 parent 2b2fe0a commit 4d94c67

File tree

2 files changed

+7
-38
lines changed

2 files changed

+7
-38
lines changed

plugin/vim-arduino-ino

Lines changed: 0 additions & 34 deletions
This file was deleted.

plugin/vim-arduino.vim

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ function! s:InvokeArduinoCli(deploy)
2929
execute "w"
3030
if a:deploy
3131
echomsg "Compiling and deploying..." l:f_name
32+
let l:result = system("ino build && ino upload")
3233
else
3334
echomsg "Compiling..." l:f_name
35+
let l:result = system("ino build")
3436
endif
3537

36-
let l:command = s:helper_dir . "/vim-arduino " . l:flag
37-
let l:result = system(l:command)
3838
echo l:result
3939
call s:PrintStatus(v:shell_error)
40+
41+
return !v:shell_error
4042
endfunction
4143

4244
" Public: Compile the current pde file.
@@ -62,8 +64,9 @@ endfunction
6264
"
6365
" Returns nothing.
6466
function! ArduinoSerialMonitor()
65-
call ArduinoDeploy()
66-
echo system(s:helper_dir."/vim-arduino-serial")
67+
if ArduinoDeploy()
68+
echo system(s:helper_dir."/vim-arduino-serial")
69+
endif
6770
endfunction
6871

6972
if !exists('g:vim_arduino_map_keys')

0 commit comments

Comments
 (0)