Skip to content

Use correct field separator in keywords.txt #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Use correct field separator in keywords.txt #1

wants to merge 1 commit into from

Conversation

per1234
Copy link

@per1234 per1234 commented May 28, 2019

The Arduino IDE requires the use of a single true tab separator between the keyword name and identifier. When spaces are used rather than a true tab, the keyword is not highlighted.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords

The Arduino IDE requires the use of a single true tab separator between the keyword name and identifier. When spaces are used rather than a true tab, the keyword is not highlighted.

Reference:
https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords
@CieNTi
Copy link
Owner

CieNTi commented May 28, 2019

Thanks for the advice @per1234, but I have a question: Is this file totally required?

If not, I'll delete it instead of fixing it. I'm totally against using a "looks the same" symbols with sooo many attached historical problems, like the "tab" is.

You made me realize that I'm already using it in this file, and I'll not keep it anymore.

Are "space" allowed inside any of the keywords? If not, then why the need of using a Tab? Makes no sense

In any case, if it is needed, please change your branch name to "hotfix/your-original-name" as I'm using Git Flow, and a direct master commit is not the way to go.

Thanks for the advice and thanks for being so nice this and other issues, as I remember you. Sorry if I appear rude but I really REALLY disagree to be on 2019 and this "Tab" thing keeps being a issue.

If the "separator" is a problem, there is more CSV-like approachs than using an invisible symbol that makes things break without even notice it.

My respects to you, and my super anti respect to Tab symbols :D

I will wait your answer before actually editing(deleting) the keyword file.

Thanks

@per1234
Copy link
Author

per1234 commented May 28, 2019

Is this file totally required?

No. It's completely optional. keywords.txt is used to color library keywords in the Arduino IDE. Quite a few 3rd party library authors don't bother with creating and maintaining a keywords.txt. It is fairly common for beginners using these libraries to think something is wrong when the function names, etc. don't color as they have come to expect from using the official Arduino libraries.

why the need of using a Tab?

Some efforts were made to allow any the use of spaces as a separator but it ended up being quite difficult to accomplish and the effort was abandoned:
arduino/Arduino#6693

I would like to see more flexibility in keywords.txt parsing because the use of spaces or multiple tabs as a field separator by 3rd party library authors is a very common problem. I also don't feel that the requirement to use a single true tab field separator is so onerous. The only time keywords.txt is edited is when there is a change to the API so it really doesn't impose much of a burden so I'm happy to work within the constraints of the existing system.

@per1234 per1234 closed this May 28, 2019
@per1234 per1234 deleted the keywords-separator branch May 28, 2019 20:51
@CieNTi
Copy link
Owner

CieNTi commented May 28, 2019

I totally understand your position, and again, thanks a lot for your time and support, as my behaviour is nothing against you or your work, which I find extremely invaluable.

Big regards

CieNTi added a commit that referenced this pull request May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants