XhmikosR / notepad2-mod

LOOKING FOR DEVELOPERS - Notepad2-mod, a Notepad2 fork, a fast and light-weight Notepad-like text editor with syntax highlighting
https://xhmikosr.github.io/notepad2-mod/
Other
1.45k stars 270 forks source link

Added HTML keywords, CSS keywords, and AutoIt3 keywords #48

Closed QWp6t closed 11 years ago

QWp6t commented 11 years ago

It's basically the same as what @phanx did, except I left in the keywords that (s)he had removed from HTML (and CSS?). I also added AutoIt3 UDFs, which can use separate styling from the built-in functions.

I can redo it so that I'm only submitting the AutoIt3 stuff if it's considered impolite for me to be making a pull request that's basically the same as what someone else already did.

I also have a separate list of ActionScript keywords that I had used in previous builds of Notepad2. If there's any interest, I can submit a pull request with that.

I also have a list of keywords for Smali (some decompiled and mangled language used in Android hacking community), except smali support would be very limited and there would likely be no code folding.

XhmikosR commented 11 years ago

I don't think we need the AutoIt3 changes; no language has the user defined stuff.

The rest look good, thanks.

QWp6t commented 11 years ago

Support for AutoIt UDF is built directly in Scintilla. Most importantly, these UDFs come from an official AutoIt keyword list for SciTE, so it isn't like we're adding keywords from randomly poached user functions in a forum or something.

You sure you don't want them?

XhmikosR commented 11 years ago

Honestly, no. But again, AU3 isn't a language I really care. You can leave them, just squash those last two commits into one.

QWp6t commented 11 years ago

I should have also mentioned that I added *.less to the list of valid CSS extensions. The reason being that Scintilla checks for .less extension in its CSS parser that's supposed to trigger some changes in how it parses the file. Upon testing it, it's not without flaws. That might be something that needs to be handled upstream, though. Maybe at a later date I'll test it more thoroughly and compare to SciTE to see if flaws are on Notepad2's end or Scintilla's end.

There are also some CSS keywords that still need to be added, but I plan on redoing a lot of the CSS stuff to get it more organized. So I'll add them in when I tackle that, most likely sometime within the next week.

XhmikosR commented 11 years ago

".less" shouldn't be added in the same commit. While it generally should work fine, CSS is not LESS so there might be more problems.

I'll wait until you finalize your changes and I'll test and merge the PR.

QWp6t commented 11 years ago

I removed .less support. Users can add the file extension(s) themselves via Customize Schemes if they want. I'll wait until Scintilla fixes their CSS parser (they have all kinds of TODOs in that file and there's a note that it needs to be redone) before I revisit this LESS issue.

// TODO: handle SCSS nested properties like font: { weight: bold; size: 1em; }
// TODO: handle SCSS interpolation: #{}
// TODO: add features for Less if somebody feels like contributing; http://lesscss.org/
// TODO: refactor this monster so that the next poor slob can read it!
XhmikosR commented 11 years ago

I'll have a closer look in the next days (still busy with real life).

XhmikosR commented 11 years ago

Thanks for your contribution!