Vim Tips Wiki
Advertisement

Use this page to discuss script 2654 arduino: syntax file for Arduino .PDE files

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Fix

As of Arduino 1.0 the file extension has changed from .pde to .ino so this line:

autocmd! BufNewFile,BufRead *.pde setlocal ft=arduino

should be:

autocmd! BufNewFile,BufRead *.ino setlocal ft=arduino

Update

This patch fixes the issue with python 2.7.3 and updates the mapping to include keywords up to Arduino 1.6.4

diff johannes-arduino-vim-syntax-8f2d23c9d7be/generate.py arduino-vim-syntax/generate.py

16a17,20 > 'Keyboard'  : 'arduinoModule', > 'switch'  : 'arduinoMethod', > 'break'  : 'arduinoMethod', > 'press'  : 'arduinoStdFunc', 64c68 < print >> sys.stderr ('Warning: No mapping for %s' % str(keywords)) --- > sys.stderr.write('Warning: No mapping for %s\n' % str(keywords)) 66c70 < print >> sys.stderr ('Warning: Collision for %s. Maps to: %s' % (str(keywords), ', '.join(maps_to))) --- > sys.stderr.write('Warning: Collision for %s. Maps to: %s\n' % (str(keywords), ', '.join(maps_to)))

Comments

Would be nice to see an update to this to address any changes to the Arduino API (if any) as Arduino is now version 1.6.1 as of writing.

Advertisement