Ⅰ. 插件描述
Arduino syntax files for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sudar/vim-arduino-syntax'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sudar/vim-arduino-syntax'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sudar/vim-arduino-syntax'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sudar/vim-arduino-syntax
Ⅳ. 文档说明
vim-arduino-syntax
Love Arduino and Vim? Then use this syntax file and get syntax highlighting for Arduino functions in vim.
This plugin contributes to vim-polyglot language pack.
Features
- Supports both Arduino IDE 1.0.x and 1.5.x
- Arduino indent and syntax highlighting
- Support for libraries provided by the IDE
- Autocompletion (using omnicomplete)
TODO
- Automatically include keywords from keywords.txt of Arduino User libraries
Installation
This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers:
Pathogen
git clone https://github.com/sudar/vim-arduino-syntaxRemember to run :Helptags to generate help tags
NeoBundle
NeoBundle 'vim-arduino-syntax'Vundle
Plugin 'sudar/vim-arduino-syntax'
:PluginInstallManual
- Copy
syntax/arduino.vimfile into your~/.vim/syntaxdirectory - Copy
ftdetect/arduino.vimfile into your~/.vim/ftdetectdirectory - Copy
indent/arduino.vimfile into your~/.vim/indentdirectory
Contributing
Contributions are always welcome in the form of pull requests with explanatory comments.
Credit
- The syntax file was originally created by Johannes Hoff. I regenerated the file using his python script and added some additional changes on top of it.
- Arduino 1.5.x support was added by z3t0
- Support for indent was added by KevinSjoberg
Other tools for Arduino and Vim
If you are using Arduino with Vim, then also checkout some of my other projects.