Skip to content

Commit 83dce85

Browse files
committed
Allow users to use custom build command
1 parent e184f92 commit 83dce85

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)
@@ -29,10 +33,10 @@ function! s:InvokeArduinoCli(deploy)
2933
execute "w"
3034
if a:deploy
3135
echomsg "Compiling and deploying..." l:f_name
32-
let l:result = system("ino build && ino upload")
36+
let l:result = system(g:vim_arduino_ino_cmd . " build && " . g:vim_arduino_ino_cmd . " upload")
3337
else
3438
echomsg "Compiling..." l:f_name
35-
let l:result = system("ino build")
39+
let l:result = system(g:vim_arduino_ino_cmd . " build")
3640
endif
3741

3842
echo l:result

0 commit comments

Comments
 (0)