Pages: [1]   Go Down
Author Topic: keywords.txt: no tabs = no highlight  (Read 1147 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Edison Member
*
Karma: 26
Posts: 1339
You do some programming to solve a problem, and some to solve it in a particular language. (CC2)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: