-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
adjusting syntax highlighting for plain text files #146
Comments
Yup, definitely an enhancement, but a seemingly reasonable one. I'll check it out :-) |
I have similar issue as I want to create a macro that would be available for Perl and Plain files, but that is not possible. I even added a new language Text to languages.yaml file
but it looks like the regex has preference over extension setting and thus all files that are recognized by regex (why not empty files?) will become of type Text no matter what the file extension is. This is how it works also in old nedit, but at least I think that the file extension should rule the language and regex should be used if extension does not match with any language definitions. |
@marilmanen when you add that to the languages.yaml file, did you put it at the very end? I believe that they are processed in order and the first match wins. So you'd almost certainly want to place that last. |
Ahh, I see, yes regex testing definitely is done before extensions. Really, what we need to do is have first-class support for specifying these things for plain text files. I'll look into what the best way to add that would be. |
While you're looking at this area… I have a common use case where I would like to use a regex on the filename for language recognition because these files have a name prefix, not a suffix (e.g. |
Will do |
When nedit doesn't know what kind of file it is opening, it opens it as a plain text file. But I can't find a way to set the syntax highlighting for this kind of file. It doesn't show up in recognition patterns as a language mode, so there is not a way to change what the default is. What I would really like to do is turn off backlighting by default for plain text files. I can create a "Plain" text mode, but it does not get selected by default. This behavior is the same as default nedit, so I guess this is an enhancement.
The text was updated successfully, but these errors were encountered: