• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomeArduinoHow to add keywords to Arduino IDE
Previous Next

How to add keywords to Arduino IDE

Posted by: Alvin Jin , March 17, 2014

1

When we use Arduino with the IDE library file, We will find, some class name, function name and constant definitions are different from general text color.So how  do our own library implement these keywords highlighted? Let me introduce, how to add keywords to Arduino IDE

1:Keyword description file path

There is a “keywords.txt ” under ArduinoIDE per database directory, this is the keyword description file. We can easily copy  this file to our own database directory , and then edit.

2: Description rules

2

The figure above is an example of a keyword, each row contains the keyword name, TAB key (non whitespace), key type. The class name is KEYWORD1, will be highlighted as orange; function names is KEYWORD2,  highlighted as brown, constant definition is KEYWORD3, the color is blue. Restart Arduino IDE ,these settings will take effect. ( note: You can not use spaces instead of TAB, otherwise this keyword set is invalid)

Tags: Arduino

Share!
Tweet

Alvin Jin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors