Summary: | # in first line should be interpreted as shell | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Philip Ashmore <contact> |
Component: | syntax | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED WORKSFORME | ||
Severity: | wishlist | CC: | christoph |
Priority: | NOR | Keywords: | triaged |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Disables unconditional interpretation of "#" as a comment marker. |
Description
Philip Ashmore
2008-04-14 15:04:21 UTC
Created attachment 24325 [details]
Disables unconditional interpretation of "#" as a comment marker.
I don't know enough about Kate syntax highlighting to specify that a "#" on the
first line marks the entire line as a comment.
> [...] a "#" on the first line marks the entire line as a comment.
Maybe we should extend the syntax highlighting system to support line="N" ? We have column="N" already. The use case is mostly only for a special line in interpreted scripts.
Other scripting languages solves this by looking for the shebang line in the first context, then moving for a different context for the main loop. Indeed, then it does not really make sense to extend the system. This seems to be 50% fixed: in the current version of the highlighter "#" is not starting comments. The shebang line seems not correctly highlighted to me though. Moving to wish list status. All highlightings works with heuristics and will never be perfect. Perhaps somebody can provide a patch, therefor not closing it. Git commit af43905a60c068efa20dee851581207ff2b6a2b3 by Dominik Haumann. Committed on 12/08/2011 at 11:26. Pushed by dhaumann into branch 'master'. highlight #!/... in 1st line correctly BUG: 160823 M +5 -1 part/syntax/data/lua.xml http://commits.kde.org/kate/af43905a60c068efa20dee851581207ff2b6a2b3 Git commit f4f537c92a979f58df24dbc55c75262dc7f544ec by Dominik Haumann. Committed on 12/08/2011 at 11:26. Pushed by dhaumann into branch 'KDE/4.7'. highlight #!/... in 1st line correctly BUG: 160823 M +5 -1 part/syntax/data/lua.xml http://commits.kde.org/kate/f4f537c92a979f58df24dbc55c75262dc7f544ec revert shebang highlighting, breaks other languages that include this language the only true fix is to add an attribute "firstLine=true/false" to the highlighting. http://quickgit.kde.org/?p=kate.git&a=commit&h=e567aff68c0809caaf56376eeb81f64a65b51ab1 We can't maintain more than 200 hls on our own, please provide a patch and reopen then ;) Documentation about highlighings see in our docs. > Other scripting languages solves this by looking for the shebang line in the
> first context, then moving for a different context for the main loop.
This won't be an option, since our highlighters include others via IncludeRules. And adding a start context for this will always lead to a problem here. This is the main reason why we won't fix this, sorry.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |