VIM

VIM is an open-source, powerful and configurable text editor. Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface.

../_images/ide-platformio-vim.png

Integration

Note

Please verify that folder where is located platformio program is added to PATH (wiki) environment variable. See FAQ: Program “platformio” not found in PATH.

“Neomake-PlatformIO” Plugin

Please visit neomake-platformio for the further installation steps and documentation.

Manual

Recommended bundles:

Put to the project directory Makefile wrapper with contents:

# Uncomment lines below if you have problems with $PATH
#SHELL := /bin/bash
#PATH := /usr/local/bin:$(PATH)

all:
    platformio -f -c vim run

upload:
    platformio -f -c vim run --target upload

clean:
    platformio -f -c vim run --target clean

program:
    platformio -f -c vim run --target program

uploadfs:
    platformio -f -c vim run --target uploadfs

update:
    platformio -f -c vim update

Pre-defined targets:

Now, in VIM cd /path/to/this/project and press Ctrl+B or Cmd+B (Mac). PlatformIO should compile your source code from the src directory, make firmware and upload it.

Note

If hotkey doesn’t work for you, try to add this line nnoremap <C-b> :make<CR> to ~/.vimrc