From 33543d6d8f31d16d299eddb5c37b19272b1eaabf Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 5 Jan 2016 02:26:37 +0200 Subject: [PATCH] Add generic targets for VIM // Issue #427 --- HISTORY.rst | 4 ++-- docs/ide/clion.rst | 2 +- docs/ide/eclipse.rst | 2 +- docs/ide/sublimetext.rst | 2 +- docs/ide/vim.rst | 22 ++++++++++++++++++++++ 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 28a5e1e7..ea5fa6e6 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,8 +7,8 @@ PlatformIO 2.0 2.7.1 (2016-01-??) ~~~~~~~~~~~~~~~~~~ -* Added generic targets for Eclipse IDE, Emacs, Sublime Text: Build, Clean, - Upload, Upload SPIFFS image, Upload using Programmer, Update installed +* Added generic targets for CLion, Eclipse IDE, Emacs, Sublime Text, VIM: Build, + Clean, Upload, Upload SPIFFS image, Upload using Programmer, Update installed platforms and libraries (`issue #427 `_) * Updated Teensy Arduino Framework to 1.26 diff --git a/docs/ide/clion.rst b/docs/ide/clion.rst index f96912db..4ab28138 100644 --- a/docs/ide/clion.rst +++ b/docs/ide/clion.rst @@ -58,7 +58,7 @@ the screenshot below): * ``PLATFORMIO_CLEAN`` - Clean compiled objects. * ``PLATFORMIO_PROGRAM`` - Build and upload using external programmer (if no errors), see :ref:`atmelavr_upload_via_programmer`. * ``PLATFORMIO_UPLOADFS`` - Upload files to file system SPIFFS, see :ref:`platform_espressif_uploadfs`. -* ``PLATFORMIO_UPDATE`` - Update installed platforms and libraries. +* ``PLATFORMIO_UPDATE`` - Update installed platforms and libraries via :ref:`cmd_update`. .. warning:: The libraries which are added, installed or used in the project diff --git a/docs/ide/eclipse.rst b/docs/ide/eclipse.rst index d8eba1b2..006cf97a 100644 --- a/docs/ide/eclipse.rst +++ b/docs/ide/eclipse.rst @@ -61,7 +61,7 @@ Then: + ``PlatformIO: Upload`` - Build and upload (if no errors) + ``PlatformIO: Upload using Programmer`` see :ref:`atmelavr_upload_via_programmer` + ``PlatformIO: Upload SPIFFS image`` see :ref:`platform_espressif_uploadfs` - + ``PlatformIO: Update platforms and libraries`` - Update installed platforms and libraries + + ``PlatformIO: Update platforms and libraries`` - Update installed platforms and libraries via :ref:`cmd_update`. If you have some problems with unresolved includes, defines, etc., then diff --git a/docs/ide/sublimetext.rst b/docs/ide/sublimetext.rst index 535185b6..7e19c468 100644 --- a/docs/ide/sublimetext.rst +++ b/docs/ide/sublimetext.rst @@ -58,7 +58,7 @@ Also, you can access to all pre-configured targets via + ``PlatformIO - Upload`` - Build and upload (if no errors) + ``PlatformIO - Upload using Programmer`` see :ref:`atmelavr_upload_via_programmer` + ``PlatformIO - Upload SPIFFS image`` see :ref:`platform_espressif_uploadfs` -+ ``PlatformIO - Update platforms and libraries`` - Update installed platforms and libraries ++ ``PlatformIO - Update platforms and libraries`` - Update installed platforms and libraries via :ref:`cmd_update`. Manual Integration ^^^^^^^^^^^^^^^^^^ diff --git a/docs/ide/vim.rst b/docs/ide/vim.rst index efb56ae6..e5e9c749 100644 --- a/docs/ide/vim.rst +++ b/docs/ide/vim.rst @@ -48,11 +48,33 @@ Put to the project directory ``Makefile`` wrapper with contents: #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: + ++ ``Build`` - Build project without auto-uploading ++ ``Clean`` - Clean compiled objects. ++ ``Upload`` - Build and upload (if no errors) ++ ``Upload using Programmer`` see :ref:`atmelavr_upload_via_programmer` ++ ``Upload SPIFFS image`` see :ref:`platform_espressif_uploadfs` ++ ``Update platforms and libraries`` - Update installed platforms and libraries via :ref:`cmd_update`. + 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,