How can I set syntax highlighting?

Discuss any topics about the editor here

How can I set syntax highlighting?

Postby rovf » Thu Sep 18, 2014 12:58 pm

How can I tell Editra, which syntax highlighter to use? The only means I found so far, is to associatie a highlighter with a certain file name extension, but this doesn't work with files which have no extensions (or no standard extension).
rovf
User
 
Posts: 8
Joined: Wed May 21, 2014 8:19 am

Re: How can I set syntax highlighting?

Postby cody » Fri Sep 19, 2014 2:02 pm

Option 1:
Can set it manually from the Settings->Lexers menu to apply highlighting to the current document.
This is per document and per session, it has no way to remember to apply the special highlighting next time you open the file or re-launch the program.

Option 2:
Edit->Preferences->Document->Code

You can set a Default Lexer - this will set the default highlighting to use when it cant figure out what the document type is.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: How can I set syntax highlighting?

Postby rovf » Sat Sep 20, 2014 7:24 am

Thanks for the explanation.

Both is not really satisfying, because if you edit files in many different languages, a default lexer doesn't help, and it is a pain to always manually choose the lexer, when opening a file.

I think I'll file a feature request, since this is a pretty common situation...
rovf
User
 
Posts: 8
Joined: Wed May 21, 2014 8:19 am

Re: How can I set syntax highlighting?

Postby cody » Wed Oct 15, 2014 1:33 pm

Sorry for delay, replied to your feature request.

This has already existed for quite some time. File extension takes precedence but when not present the first line of file is checked for interpreter signature.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron