Feature request: Make syntax highlight configurable
A simple text editor with a ribbon UI
Brought to you by:
steveking
BowPad seems to guess somehow, what kind of Syntax Highlighting is done for a certain document. For example, I have a file .irbrc, which I would expect being highlighted as Ruby file, but it is highlighted as bash file.
I suggest that the user can somehow control the highlight mode. For example, one could supply a list of filename patterns for each highlight mode, or BowPad could look in the first few lines of a file for a "mode line" indicating the highlight mode, as Emacs or jEdit are doing.
go to "configure styles" (in the "other" tab).
Then in that dialog, select "Ruby" from the "Language" combobox. And then at the bottom, enter the extension "irbrc". Separate multiple file extensions with ";". The click ok.
BowPad also remembers if you change the lexer for a loaded file, so the next time you load that file that same lexer is used instead of the default one set in the styles dialog.
This is great!
May I suggest that the Style Configurator Window contains a small help
text (or tooltip), explaining - maybe with an example - that the
extensions should be separated by semicolon, as this is not obvious.
Ronald
On Fri, Jun 9, 2017, at 20:07, Stefan Kueng wrote:
[r2025]
Related
Commit: [r2025]
It turned out that it worked for Ruby, but now I had a case where it didn't work: I also had changed the configuration for the Bash style, setting the Extension string to
Now, a couple of days later, I opened a file with name common_show.zsh, and it was rendered as Text, not as Bash. Of course I could manually select the lexer, but I wonder why my settings did not invoke the lexer automatically. Could it be caused by the underscore in the filename?
You have to set the extension string without the dots:
bash;bashrc;sh;sh_once;zsh;zshrc