File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -391,8 +391,14 @@ function! s:CacheLine(lines, varname)
391
391
endfunction
392
392
393
393
function ! arduino#GetArduinoDir ()
394
+ if exists (' g:arduino_dir' )
395
+ return g: arduino_dir
396
+ endif
394
397
let arduino_cmd = arduino#FindExecutable (' arduino' )
395
398
let arduino_dir = fnamemodify (arduino_cmd, ' :h' )
399
+ if ! s: FileExists (arduino_dir . ' /hardware/arduino/' )
400
+ throw " Could not find arduino directory. Please set g:arduino_dir"
401
+ endif
396
402
return arduino_dir
397
403
endfunction
398
404
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ The path to the 'arduino' command. By default it will use the
40
40
'arduino-headless' script in the 'bin' directory, which looks for 'arduino' in
41
41
your PATH and runs it inside Xvfb if it can. >
42
42
let g:arduino_cmd = '/usr/share/local/arduino/arduino'
43
+ <
44
+ *'g:arduino_dir'*
45
+ The path to your 'arduino' directory. Usually vim-arduino will be able to
46
+ detect it, but if it cannot you can set the value manually.
47
+ let g:arduino_dir = '/usr/share/local/arduino'
43
48
<
44
49
*'g:arduino_args'*
45
50
Additional arguments that will be passed to the 'arduino' command during build
Original file line number Diff line number Diff line change 2
2
'g:arduino_auto_baud' arduino.txt /*'g:arduino_auto_baud'*
3
3
'g:arduino_board' arduino.txt /*'g:arduino_board'*
4
4
'g:arduino_cmd' arduino.txt /*'g:arduino_cmd'*
5
+ 'g:arduino_dir' arduino.txt /*'g:arduino_dir'*
5
6
'g:arduino_programmer' arduino.txt /*'g:arduino_programmer'*
6
7
'g:arduino_serial_baud' arduino.txt /*'g:arduino_serial_baud'*
7
8
'g:arduino_serial_cmd' arduino.txt /*'g:arduino_serial_cmd'*
You can’t perform that action at this time.
0 commit comments