I just spent hours on problem relating to Ruby/Rails sytnax highlighting in Geany. It looks very strange. See here: It seems to be problem with regex rules for pairs <...>, </...> , %=...%= . http://geany-users.466218.n3.nabble.com/file/n3677063/zrzut.png Does anybody know what and where can I change to make syntax highlighting more suitable?
-- View this message in context: http://geany-users.466218.n3.nabble.com/Ruby-Rails-strange-syntax-highlighti... Sent from the Geany-Users mailing list archive at Nabble.com.
On 01/20/2012 05:41 PM, darek wrote:
I just spent hours on problem relating to Ruby/Rails sytnax highlighting in Geany. It looks very strange. See here: It seems to be problem with regex rules for pairs<...>,</...> , %=...%= . http://geany-users.466218.n3.nabble.com/file/n3677063/zrzut.png Does anybody know what and where can I change to make syntax highlighting more suitable?
Have you tried setting the filetype to HTML? I'm not sure it highlights embedded Ruby code, but it should highlight the HTML correctly.
Disclaimer: I don't know Ruby or Rails
Cheers, Matthew Brush
On Sat, Jan 21, 2012 at 12:48 PM, Matthew Brush mbrush@codebrainz.ca wrote:
On 01/20/2012 05:41 PM, darek wrote:
I just spent hours on problem relating to Ruby/Rails sytnax highlighting in Geany. It looks very strange. See here: It seems to be problem with regex rules for pairs<...>,</...> , %=...%= . http://geany-users.466218.n3.nabble.com/file/n3677063/zrzut.png Does anybody know what and where can I change to make syntax highlighting more suitable?
The lexing is done in C++ code, not regexes, in Scintilla LexRuby.cxx (if your filetype is Ruby) or LexHTML.cxx (if your filetype is HTML).
Have you tried setting the filetype to HTML? I'm not sure it highlights embedded Ruby code, but it should highlight the HTML correctly.
Ruby does not support embedding HTML nor HTML support embedded ruby AFAICT.
Cheers Lex
Disclaimer: I don't know Ruby or Rails
Cheers, Matthew Brush
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Have you tried setting the filetype to HTML? I'm not sure it highlights embedded Ruby code, but it should highlight the HTML correctly.
Ruby does not support embedding HTML nor HTML support embedded ruby AFAICT.
Ruby on Rails views are HTML with embedded Ruby (ERb), with an extension of ".html.erb". The HTML lexer currently supports highlighting for JS, PHP, Python, ASP, but not Ruby. So this support will need to be added if you want ERb highlighting within HTML.
Cheers Nathan
P.S. I was previously thinking about writing a Haml lexer, but I've given up on that idea. Fixing the Ruby lexer so that it works with Haml was good enough.
On Sat, Jan 21, 2012 at 1:15 PM, Nathan Broadbent nathan.f77@gmail.com wrote:
Have you tried setting the filetype to HTML? I'm not sure it highlights embedded Ruby code, but it should highlight the HTML correctly.
Ruby does not support embedding HTML nor HTML support embedded ruby AFAICT.
Erm, sorry I meant the ruby lexer and the HTML lexer respectively, not the languages themselves.
Ruby on Rails views are HTML with embedded Ruby (ERb), with an extension of ".html.erb". The HTML lexer currently supports highlighting for JS, PHP, Python, ASP, but not Ruby. So this support will need to be added if you want ERb highlighting within HTML.
Correct.
Cheers Lex
Cheers Nathan
P.S. I was previously thinking about writing a Haml lexer, but I've given up on that idea. Fixing the Ruby lexer so that it works with Haml was good enough. _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
I understand what are you talking about. So, as temporary solution I will use HTML or PHP filetype, both makes syntax highlighting better. Later on I'll try to make a little source code modification.
Thanks for help Darek
-- View this message in context: http://geany-users.466218.n3.nabble.com/Ruby-Rails-strange-syntax-highlighti... Sent from the Geany-Users mailing list archive at Nabble.com.