You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you wish to run these commands in tmux/screen/some other location, you can
63
-
make use of [vim-slime](https://github.com/jpalardy/vim-slime):
119
+
## Configuration
64
120
65
-
```vim
66
-
let g:arduino_use_slime = 1
67
-
```
121
+
By default you should not _need_ to set any options for vim-arduino to work
122
+
(especially if you're using `arduino-cli`, which tends to behave better). If
123
+
you want to see what's available for customization, there is detailed
124
+
information [in the vim docs](https://github.com/stevearc/vim-arduino/blob/master/doc/arduino.txt).
125
+
126
+
## Integrations
127
+
128
+
### Dialog / picker plugins
129
+
130
+
The built-in mechanism for choosing items (e.g. `:ArduinoChooseBoard`) uses
131
+
`inputlist()` and is not very pretty or ergonomic. If you would like to improve
132
+
the UI, there are two approaches:
133
+
134
+
-**Neovim:** override `vim.ui.select` (e.g. by using a plugin like [dressing.nvim](https://github.com/stevearc/dressing.nvim))
135
+
-**Vim8:** install [ctrlp](https://github.com/ctrlpvim/ctrlp.vim) or [fzf](https://github.com/junegunn/fzf.vim). They will automatically be detected and used
136
+
137
+
### Tmux / screen
138
+
139
+
If you want to run the arduino commands in a separate tmux or screen pane, use
140
+
[vim-slime](https://github.com/jpalardy/vim-slime). By setting `let g:arduino_use_slime = 1` vim-arduino will send the commands via `slime#send()` instead of running them inside a vim terminal.
68
141
69
142
### Status Line
70
143
71
-
If you want to add the board type to your status line, it's easy with the
72
-
following:
144
+
You may want to display the arduino state in your status line. There are four
145
+
pieces of data you may find interesting:
73
146
74
-
```vim
75
-
" my_file.ino [arduino:avr:uno]
76
-
function! MyStatusLine()
77
-
return '%f [' . g:arduino_board . ']'
78
-
endfunction
79
-
setl statusline=%!MyStatusLine()
80
-
```
147
+
-**g:arduino_board** - the currently selected board
148
+
-**g:arduino_programmer** - the currently selected programmer
149
+
-**g:arduino_serial_baud** - the baud rate that will be used for Serial commands
150
+
-**arduino#GetPort()** - returns the port that will be used for communication
81
151
82
-
This is my personal configuration (again, inside `ftplugin/arduino.vim`)
152
+
An example with vanilla vim or nvim, added to `ftplugin/arduino.vim`:
0 commit comments