All Projects → stevearc → Vim Arduino

stevearc / Vim Arduino

Licence: mit
Vim plugin for compiling and uploading arduino sketches

Projects that are alternatives of or similar to Vim Arduino

Vim Tidal
Vim plugin for TidalCycles
Stars: ✭ 147 (-21.39%)
Mutual labels:  vim-plugins
Vim Operator User
Vim plugin: Define your own operator easily
Stars: ✭ 161 (-13.9%)
Mutual labels:  vim-plugins
Exit Vim
Vim plugin that exits Vim on startup
Stars: ✭ 176 (-5.88%)
Mutual labels:  vim-plugins
Vim Gutentags
A Vim plugin that manages your tag files
Stars: ✭ 1,977 (+957.22%)
Mutual labels:  vim-plugins
Vimux
easily interact with tmux from vim
Stars: ✭ 1,980 (+958.82%)
Mutual labels:  vim-plugins
Vim Dadbod Completion
Database autocompletion powered by https://github.com/tpope/vim-dadbod
Stars: ✭ 163 (-12.83%)
Mutual labels:  vim-plugins
Wmgraphviz.vim
Vim plugin for Graphviz
Stars: ✭ 142 (-24.06%)
Mutual labels:  vim-plugins
Startuptime.vim
Breakdown Vim's --startuptime output
Stars: ✭ 180 (-3.74%)
Mutual labels:  vim-plugins
Targets.vim
Vim plugin that provides additional text objects
Stars: ✭ 2,114 (+1030.48%)
Mutual labels:  vim-plugins
Vim Shortcut
💇 Discoverable & searchable shortcuts for (Neo)Vim
Stars: ✭ 170 (-9.09%)
Mutual labels:  vim-plugins
Reflowduino
Arduino-compatible wireless reflow oven controller ecosystem of open-source hardware
Stars: ✭ 154 (-17.65%)
Mutual labels:  arduino-ide
Vim Ruby
Vim/Ruby Configuration Files
Stars: ✭ 1,885 (+908.02%)
Mutual labels:  vim-plugins
Stackanswers.vim
Vim plugin to fetch and display answers from Stack Overflow
Stars: ✭ 165 (-11.76%)
Mutual labels:  vim-plugins
Stm32 arduino cores
STM M3 ARM Cores for Arduino IDE.Makes Arduino IDE supports stm32f103.
Stars: ✭ 147 (-21.39%)
Mutual labels:  arduino-ide
Arduino Applemidi Library
Send and receive MIDI messages over Ethernet (rtpMIDI or AppleMIDI)
Stars: ✭ 177 (-5.35%)
Mutual labels:  arduino-ide
Django Plus.vim
🎸 Improvements to the handling of Django related files in Vim
Stars: ✭ 145 (-22.46%)
Mutual labels:  vim-plugins
Garhage
a Home-Automation-friendly ESP8266-based MQTT Garage Door Controller
Stars: ✭ 163 (-12.83%)
Mutual labels:  arduino-ide
Dhtesp
Optimized DHT library for ESP32/ESP8266 using Arduino framework
Stars: ✭ 184 (-1.6%)
Mutual labels:  arduino-ide
Esp32 Ble Mouse
Bluetooth LE Mouse library for the ESP32 (Arduino IDE compatible)
Stars: ✭ 180 (-3.74%)
Mutual labels:  arduino-ide
Esp8266 Spotify Remote
Control your Spotify player from a ESP8266 with color touch display
Stars: ✭ 170 (-9.09%)
Mutual labels:  arduino-ide

vim-arduino

Vim plugin for compiling, uploading, and debugging arduino sketches. It makes use of the Arduino IDE's commandline interface (new in 1.5.x).

Installation

vim-arduino works with Pathogen

cd ~/.vim/bundle/
git clone https://github.com/stevearc/vim-arduino

and vim-plug

Plug 'stevearc/vim-arduino'

You also need to download the Arduino IDE (version 1.5 or newer) and make sure the arduino command is in your PATH.

Platforms

vim-arduino should work with no special configuration on Linux and Mac. I have not tested on Windows, but have heard that it works via WSL. See #4 for discussion.

Configuration

The docs have detailed information about configuring vim-arduino here.

The main commands you will want to use are:

  • :ArduinoChooseBoard - Select the type of board from a list.
  • :ArduinoChooseProgrammer - Select the programmer from a list.
  • :ArduinoChoosePort - Select the serial port from a list.
  • :ArduinoVerify - Build the sketch.
  • :ArduinoUpload - Build and upload the sketch.
  • :ArduinoSerial - Connect to the board for debugging over a serial port.
  • :ArduinoUploadAndSerial - Build, upload, and connect for debugging.
  • :ArduinoInfo - Display internal information. Useful for debugging issues with vim-arduino.

To make easy use of these, you may want to bind them to a key combination. You can put the following in .vim/ftplugin/arduino.vim:

nnoremap <buffer> <leader>am :ArduinoVerify<CR>
nnoremap <buffer> <leader>au :ArduinoUpload<CR>
nnoremap <buffer> <leader>ad :ArduinoUploadAndSerial<CR>
nnoremap <buffer> <leader>ab :ArduinoChooseBoard<CR>
nnoremap <buffer> <leader>ap :ArduinoChooseProgrammer<CR>

If you wish to run these commands in tmux/screen/some other location, you can make use of vim-slime:

let g:arduino_use_slime = 1

Status Line

If you want to add the board type to your status line, it's easy with the following:

" my_file.ino [arduino:avr:uno]
function! MyStatusLine()
  return '%f [' . g:arduino_board . ']'
endfunction
setl statusline=%!MyStatusLine()

Or if you want something a bit fancier that includes serial port info:

" my_file.ino [arduino:avr:uno] [arduino:usbtinyisp] (/dev/ttyACM0:9600)
function! MyStatusLine()
  let port = arduino#GetPort()
  let line = '%f [' . g:arduino_board . '] [' . g:arduino_programmer . ']'
  if !empty(port)
    let line = line . ' (' . port . ':' . g:arduino_serial_baud . ')'
  endif
  return line
endfunction
setl statusline=%!MyStatusLine()

Note: if you are using the 'airline' plugin for the status line, you can display this custom status part instead of the filename extension with:

autocmd BufNewFile,BufRead *.ino let g:airline_section_x='%{MyStatusLine()}'

License

Everything is under the MIT License except for the wonderful syntax file, which was created by Johannes Hoff and copied from vim.org and is under the Vim License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].