Go Down

Topic: keywords.txt: no tabs = no highlight (Read 3324 times) previous topic - next topic

tuxduino

Just a quick note to save me some googling next time I forget about this detail... (hopefully it will save somebody else 5 minutes too)
When writing a library, items in keywords.txt files need to be spaces with a tab character, like this:

SerialClass<tab>KEYWORD1

(I couldn't see what was wrong with my lib keywords.txt file because I stopped using tabs long ago)

retrolefty

Good to Know. Other then give users a nice visual clue that a name is already being used by a library file does the colored text offer any other advantages? I note that many libraries don't both adding a keywords.txt file?

Lefty

tuxduino


Good to Know. Other then give users a nice visual clue that a name is already being used by a library file does the colored text offer any other advantages? I note that many libraries don't both adding a keywords.txt file?

Lefty


No, I don't think there are any other clues. Also, I noticed the syntax coloring adds up, i.e. it's used even if the library is not included. So I guess if every library I have(1) had a keywords.txt file, every sketch would be half coloured ;P

A nice addition to "import library" would be to "activate" that library keywords.txt. (No, wait, it would need to detect the use of a library from its include statement...)

(1) many of those library are mine, written for my personal use, so not as cleaned up as they should, and missing keywords.txt.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy