@@ -29,8 +29,8 @@ users make sure the `arduino` command is in your PATH.
2929## Platforms
3030
3131vim-arduino should work with no special configuration on Linux and Mac. I have
32- not tested on Windows, but have heard that it works via WSL. See # 4 for
33- discussion.
32+ not tested on Windows, but have heard that it works via WSL. See
33+ [ this issue ] ( https://github.com/stevearc/vim-arduino/issues/4 ) for discussion.
3434
3535## Configuration
3636
@@ -79,19 +79,22 @@ endfunction
7979setl statusline=%!MyStatusLine()
8080```
8181
82- Or if you want something a bit fancier that includes serial port info:
82+ This is my personal configuration (again, inside ` ftplugin/arduino.vim ` )
8383
8484``` vim
8585" my_file.ino [arduino:avr:uno] [arduino:usbtinyisp] (/dev/ttyACM0:9600)
86- function! MyStatusLine ()
86+ function! ArduinoStatusLine ()
8787 let port = arduino#GetPort()
88- let line = '%f [' . g:arduino_board . '] [' . g:arduino_programmer . ']'
88+ let line = '[' . g:arduino_board . '] [' . g:arduino_programmer . ']'
8989 if !empty(port)
9090 let line = line . ' (' . port . ':' . g:arduino_serial_baud . ')'
9191 endif
9292 return line
9393endfunction
94- setl statusline=%!MyStatusLine()
94+ augroup ArduinoStatusLine
95+ autocmd! * <buffer>
96+ autocmd BufWinEnter <buffer> setlocal stl=%f\ %h%w%m%r\ %{ArduinoStatusLine()}\ %=\ %(%l,%c%V\ %=\ %P%)
97+ augroup END
9598```
9699Note: if you are using the 'airline' plugin for the status line, you can display
97100this custom status part instead of the filename extension with:
0 commit comments