zufuliu / notepad4

Notepad4 (Notepad2⨯2, Notepad2++) is a light-weight Scintilla based text editor for Windows with syntax highlighting, code folding, auto-completion and API list for many programming languages and documents, bundled with file browser plugin matepath.
Other
2.56k stars 179 forks source link

WinHex templates and scripts are not yet supported. #714

Closed lenny20 closed 9 months ago

lenny20 commented 11 months ago

Winhex templates (.tpl) and scripts (.whs) are quite commonly used and I would like to support syntax highlighting for them. Thanks!

zufuliu commented 11 months ago

http://www.winhex.com/winhex/scripting.html by default, .tpl can't be assigned to WinHex as other template file also use this extension.

zufuliu commented 11 months ago

Added a simple lexer in 76579cb9047eca257ad2d264b912d8a044131348, please test latest builds from https://github.com/zufuliu/notepad2/actions. .tpl is currently assigned to "Web Source Code" scheme, you will need to remove that and it to "WinHex Script" scheme.

lenny20 commented 11 months ago

I've tried this, it's not aesthetically pleasing. I would like to put .tpl and .whs to C or Pascal Source tag. No need for new winhex tags.

zufuliu commented 11 months ago

No need for new winhex tags

WinHex is not C++.

lenny20 commented 11 months ago

Both C and Pascal Source tags look good.

zufuliu commented 11 months ago

It has to be a different scheme due to different syntax and keywords.

put following to Notepad2.ini will make everything work:

[File Extensions]
Web Source Code=html; htm; shtml; xhtml; asp; aspx; jsp; mht; htd; htt; hta; htc; cfm; jd
WinHex Script=whs; tpl
lenny20 commented 11 months ago

OK. Thank you!