Skip to content

Commit c890e33

Browse files
authored
Merge pull request jplaut#6 from stevearc/master
Allow users to use custom build command
2 parents 685b637 + 83dce85 commit c890e33

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ add this to your `.vimrc`:
4646
let g:vim_arduino_auto_open_serial = 1
4747
```
4848

49+
To change the command used to build and deploy :
50+
51+
```
52+
let g:vim_arduino_ino_cmd = 'ano'
53+
```
54+
4955

5056
[ino-config]: http://inotool.org/quickstart#configuration-files
5157
[ino-source]: https://pypi.python.org/pypi/ino/#downloads

plugin/vim-arduino.vim

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ if !exists('g:vim_arduino_auto_open_serial')
1010
let g:vim_arduino_auto_open_serial = 0
1111
endif
1212

13+
if !exists('g:vim_arduino_ino_cmd')
14+
let g:vim_arduino_ino_cmd = 'ino'
15+
endif
16+
1317
let s:helper_dir = expand("<sfile>:h")
1418

1519
function! s:PrintStatus(result)
@@ -30,10 +34,10 @@ function! s:InvokeArduinoCli(deploy)
3034
execute "w"
3135
if a:deploy
3236
echomsg "Compiling and deploying..." l:f_name
33-
let l:result = system("ino build && ino upload")
37+
let l:result = system(g:vim_arduino_ino_cmd . " build && " . g:vim_arduino_ino_cmd . " upload")
3438
else
3539
echomsg "Compiling..." l:f_name
36-
let l:result = system("ino build")
40+
let l:result = system(g:vim_arduino_ino_cmd . " build")
3741
endif
3842

3943
echo l:result

0 commit comments

Comments
 (0)