Create and include custom keywords.txt file for AVR specific code

Hi!
I'm using the Arduino IDE for both Arduino and AVR programming, and often combining these two. However, I often miss the color highlights that Arduino specific functions get, and would like to add these to AVR functions such as DDRA, DDRB, DDRC, PORTA, PORTB and so on. I found the original keywords.txt in the directory /java/lib. I want to extend this file by creating a new one. My question is; where (like in what directory) should I place this so the IDE can find and include the file? I don't want to modify or replace the original one, as I'll need to to a backup every time I update the IDE.

In your libraries folder (user libraries, not the one in the Arduino install folder):

  • Create a folder named keywords
  • add a keywords.txt file in there with all your defs
  • add an empty file named keywords.h << this makes the IDE think its a lib and will load its keywords.txt
  • restart IDE