Code highlighting in browser (codemirror)

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
User avatar
chromo23
Normal user
Posts: 417
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Code highlighting in browser (codemirror)

#51 Post by chromo23 » 30 Jun 2022, 23:16

in case anyone is interested in building espeasy with codehighlighting can do this here:
https://github.com/chromoxdor/ESPEasy/tree/powercolor
(i initally used it for my plugs with integrated power-meters therefore the strange name)

what else is different:
-custom css
-includes js and css files in custom 1m builds (for using devices without internet)

User avatar
chromo23
Normal user
Posts: 417
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Code highlighting in browser (codemirror)

#52 Post by chromo23 » 18 Jul 2022, 22:21

I made some updates which makes it even more nicer to write rules:

- auto-activation of hinting through typing
- comments are now excluded from hinting
- minor sorting and highlighting issues fixed

have fun!

User avatar
chromo23
Normal user
Posts: 417
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Code highlighting in browser (codemirror)

#53 Post by chromo23 » 26 Jul 2022, 11:03

More small updates:
- minor color changes
- added System Variables and Standard Conversions to the word list
- Taskvariables in [] are now being also suggested
hint2.png
hint2.png (22.38 KiB) Viewed 127 times
hint1.png
hint1.png (21.57 KiB) Viewed 127 times

User avatar
chromo23
Normal user
Posts: 417
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Code highlighting in browser (codemirror)

#54 Post by chromo23 » 01 Aug 2022, 21:46

I added more stuff:

- "On"+enter, "Do"+enter or "If"+enter will result in autocompletion.
- "Logentry" + Enter adds quotation marks
- Autoclose brackets
- You can now search and replace in rules.
- hex numbers like in [p116] colorcodes or numbers prefixed with "0x" are now marked as numbers
- Now softabs are beeing used
- Longtouch on mobile devices opens search and replace dialog (hopefully)

Here some useful shortcuts:
Ctrl-F / Cmd-F -> Start searching
Ctrl-G / Cmd-G -> Find next
Shift-Ctrl-G / Shift-Cmd-G -> Find previous
Shift-Ctrl-F / Cmd-Option-F -> Replace
Shift-Ctrl-R / Shift-Cmd-Option-F -> Replace all
Tab -> softtab
Select then Tab -> indent selection
Shift-Tab -> dedent
Select then Shift-Tab -> dedent selection
esprules.gif
esprules.gif (417.58 KiB) Viewed 83 times
espcolor_search.gif
espcolor_search.gif (566.32 KiB) Viewed 83 times

TD-er
Core team member
Posts: 6354
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Code highlighting in browser (codemirror)

#55 Post by TD-er » 01 Aug 2022, 21:58

This is soooo cool ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests