My new favorite AHK editing environment: EditPad with MishMash

Discuss features, issues, about Editors for AHK
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 19 May 2019, 13:10

After pulling my hair over AHK Studio repeatedly messing with my code, I decided to create a syntax-coloring code for EditPad Pro, an editor I've used for years and that has never done me wrong.

Image

Shared this Autohotkey syntax-coloring scheme on a GitHub repo.

There is no auto-complete, but for my taste it's better — the pop-ups bother me, and if I misspell something I know it's wrong as it doesn't get colored.
After trying to edit AHK in N++, AHK Studio, SciTE for AHK and VS Code, EditPad Pro is now by far my favorite AHK editing enviroment. Your needs may be different, mine have to do with a huge script spanning more than a dozen files and hundred functions.

The page gives the reasons this set-up works for me, but here are three of the key ones:
  • Function navigation on a file-by-file basis
  • Hugely powerful search-and-replace (EPP is made by the same guy as RegexBuddy)
  • Bookmarks that I can understand and that work with hotkeys
Only downside for those who only use freeware: EPP costs 40 bucks (free trial here) — didn't matter to me as I've owned an EPP license for years.

This was quite a bit of work — hope someone else gets something out of it!
And I realize it can be improved, so please don't hesitate to send comments.

Peace
:D
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 07 Mar 2021, 10:57

Re Your AHK syntax for EditPad Pro: Hey thanks for sharing this! Question though: Is there an ini file that has the definitions? In EPP8, if I try to import a new language, it looks for an ini.
ste(phen|ve) kunkel
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 07 Mar 2021, 12:21

Hey there, yes there is. Did you see the GitHub page in my post?
- at the top it explains how to install MishMash, the color definitions themselves (INI file)
- in the "how to install" section it explains how to install the AutoHotkey syntax-coloring scheme from within EPP8.
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 07 Mar 2021, 15:00

Any chance you'd be willing to post the contents of the ini?

I'm using my work laptop, and I'm not an administrator, so I can't install much of anything. I only got EPP to work by "installing" it to the C Drive of a different computer, then copying everything to the C Drive of this laptop....
ste(phen|ve) kunkel
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 07 Mar 2021, 17:06

Once again, it's on GitHub. See point 2 after the TL;DR.
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 07 Mar 2021, 18:01

Thanks for the replies freespacing! I hadn't noticed your instructions on the GitHub page. Using those, I was able to get it to work.
ste(phen|ve) kunkel
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 08 Mar 2021, 04:54

Glad you got it working, hope you like it. :-)
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 08 Mar 2021, 11:29

To tell the truth I'm not even sure I set up the correct one.
This is the one I ended up downloading (I think it might've come from the EPP site(?))

Image
ste(phen|ve) kunkel
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 08 Mar 2021, 15:14

It's nice. I like the color scheme!

A couple notes:
The above link
https://www.autohotkey.com/boards/viewtopic.php?f=60&t=64684&p=386280#p386280
is different from the one that appears at the very bottom of the above screenshot (partially obscured).
https://github.com/boolbag/EditPad-Goodies/tree/master/Making%20Text%20Pretty%20-%20Syntax%20Coloring%20and%20Color%20Palettes/Color%20Palettes/MishMash

Also it doesn't like it when a hotstring has a space (see bottom of below screenshot). "::world of::"

Lastly, I'm just curious why it highlights words like "pathologist," "disability," "atypicality," and "somatization."

Image
ste(phen|ve) kunkel
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 08 Mar 2021, 18:34

First off, did you change the colors? This doesn't look like my version of MishMash. Or maybe you didn't specify MishMash as the color palette to work with the syntax-coloring scheme?

Regarding the strange highlighted words such as Atypicality, I had allowed spaces between the function name and the parentheses.
Regarding ::would of::, I had not put hotstrings in the syntax coloring schemes, so it was taking everything previous to :: as forming part of a hotkey instead.

Made some quick changes to fix that, the updated syntax-coloring scheme is live inside EPP8, just re-download the scheme within EPP8 and see if that works for you.
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 08 Mar 2021, 20:30

I don't think I changed to colors(?) Below is a screenshot with 'dark mode' turned off though. Does this look more familiar? You can also see my Config setup in the screenshot.

Regarding the strange words getting highlighted... facepalm :facepalm: I didn't even notice that every one of the pinkish words preceded a set of parentheses.

Hmm... As I'm typing this post, I just set the file type of this particular ahk file to "Unspecified File Type." When I did that, it changed to what is seen in the bottom screenshot. Is that your color scheme?

It seems strange to me that EPP is behaving this way... I'm probably doing something wrong... I'll tinker more and maybe check in to the JGS forums.

Image

"Unspecified file type"
Image
ste(phen|ve) kunkel
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 09 Mar 2021, 03:55

In the Settings screenshot you sent me, the first pull-down is for the color palette. This is where you say that you want to use MishMash (you'll need to import the INI file which you found on GitHub).

Remember, setting the colors in EPP is a two-step dance:
1. Selecting the "Syntax-coloring scheme". This is what you already did by selecting AHK for MishMash. What this coloring scheme does is give EPP rules for analyzing a document, for instance telling it that something like ::Thank you.:: is called a HotString, and that HotStrings should be colored with the a standard EPP color NAME called (for instance) "Hyperlink". But the Syntax-coloring scheme does not define what the Hyperlink color is. This is what the palette does.

2. Selecting the "Color palette", in this case, MishMash. A color palette associates some standard EPP color NAME with an actual color definition (rgb, hex, ...).

You did step 1 but not step 2. This means that EPP knows how to treat AHK syntax, it knows that it needs to color certain bits according to the color set in the current palette. But since you did not set the palette to MishMash, it uses whatever colors are set in your current palette. That's not optimal. That's why I called the Syntax-coloring scheme "AHK for MishMash": it's optimized to work with my MishMash palette.

Of course you can later edit the color palette to your taste, but I think it will be a better start.
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 09 Mar 2021, 10:19

Is this the correct ini?
https://raw.githubusercontent.com/boolb ... h-EPP8.ini
Spoiler
ste(phen|ve) kunkel
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 09 Mar 2021, 10:26

That looks right but I'm not going to diff the file to check every detail, I assume you got there from the GitHub link in my top post and you went to the MishMash section and selected the EPP8 version. Check it out, I think you'll find it makes a bit difference to my various syntax-coloring schemes.
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 09 Mar 2021, 11:15

Okay then, this must be correct--at least it looks a lot closer to the one in your first post!
That was surprisingly difficult for my pea brain...
Thanks for walking me through it!

Image
ste(phen|ve) kunkel
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 09 Mar 2021, 11:26

You got it! :dance:

Yes, it takes a moment to understand how EPP does colors. That separation of interests (syntax vs. colors) makes sense but the implementation is less than intuitive.

If you see any bugs or missing features in the syntax highlighting, let me know. I've probably ignored a number of things I don't use, like the hotstrings you brought to my attention yesterday.
freespacing
Posts: 150
Joined: 28 Sep 2016, 11:14
Contact:

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by freespacing » 09 Mar 2021, 11:28

By the way it doesn't look like you updated the ahk scheme within EPP as the two issues you reported yesterday haven't been fixed on your screenshot — they should be.
User avatar
kunkel321
Posts: 976
Joined: 30 Nov 2015, 21:19

Re: My new favorite AHK editing environment: EditPad with MishMash

Post by kunkel321 » 09 Mar 2021, 14:40

I think I updated it(?) Here, I tried to make a huge gif.

Bah. Can't insert as picture. Here's the link though
https://imgur.com/a/ek8Ue37

EDIT:
In the gif, the "file type" is set to default. If I set it to "unspecified file type" via Options > File Type, then it appears as this:
Image
ste(phen|ve) kunkel
Post Reply

Return to “Editors”