Notepad++ Syntax Highlight (Dark Theme) - AHK v1/2 combined - 2020/07/02

Discuss features, issues, about Editors for AHK
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Notepad++ Syntax Highlight (Dark Theme) - AHK v1/2 combined - 2020/07/02

10 Feb 2020, 14:32

*** This is a work in progress. Please let me know if you find something missing, or put in the wrong place. ***
  • This is AHK v1 and v2 combined. All variables, functions, commands, objects, methods, properties, and flow control keywords are included in the syntax highlighting.
I will probably only host the Syntax Highlighting here in the near future, now that my CallTipsForAll script is functional. If you want advanced and responsive call tips (function hints) for AHK v1 and v2 check out CallTipsForAll.
For yesterday's post I forgot to upload the changes. They are now uploaded.

============================================================
Latest Downloads
============================================================
AutoHotkey v1-v2 Syntax Highlighting.zip
(5.09 KiB) Downloaded 945 times
============================================================
Updates
============================================================


============================================================
Everything below here is old.
============================================================
NPP SyntHiglight+AutoComp+FuncHint.zip
Syntax Highlighting, AutoComplete + Function Hints
(21.93 KiB) Downloaded 730 times
So the files are attached and here's how you install them.
============================================================
How to use my version of Function Hints and why use a period (.) for everything...
============================================================

============================================================
My source files to generate Auto Complete / call tip XML:
AutoHotkeyDocs.zip
The script and source files I used to generate the AutoComplete XML file.
(22.08 KiB) Downloaded 252 times
How to use my source files
============================================================

For custom call tips that don't need . try CallTipsForAll
Last edited by TheArkive on 28 Jul 2020, 03:59, edited 17 times in total.
User avatar
Cerberus
Posts: 169
Joined: 12 Jan 2016, 15:46

Re: Notepad++ Syntax Highlight and Auto-Complete (dark theme) - AHK v1 and v2 combined - 2020/02/10

16 Feb 2020, 18:29

Great work! I'll try these when next I use Notepad++.
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight and Auto-Complete (dark theme) - AHK v1 and v2 combined - 2020/03/06

06 Mar 2020, 13:50

Updated!

The new update is MUCH more complete and functional than before.

Now you have AutoComplete + Function Hints, and syntax highlighting for:
  • Functions (+ hints)
  • Commands (+ hints)
  • Objects (+ hints)
  • Methods (+ hints)
  • Properties (+ hints)
  • Variables
  • Flow Control Keywords
  • Keys List
AHK1 and 2 is included in these files, and the hint data shows you which version of AHK the keyword applies to.

Basics: Type keyword and press . (period) for hint window. Press Backspace to close window and remove the .. This workaround is what allows me to create hint data for all these types of syntax elements.

ToDo:
  • I'm going to revise this, now that I have the script done and I've defined the format that's easy to work with, I can just edit the source files and make much more descriptive and helpful hints.
  • I might try and turn this into a script that runs in the background, and will hopefully be compatible with any text editor, using CaretGetPos([OutputVarX, OutputVarY]). If this works then I'll include URL's to help docs as much as possible in a future update.
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1 and v2 combined - 2020/03/08 - release 3

08 Mar 2020, 17:23

2020/03/08 Update:
  • added TreeView functions from AHK1 to syntax highlighting, autocomplete, and call tips
  • added ListView functions from AHK1 to syntax highlighting, autocomplete, and call tips
  • added ImageList functions from AHK1 to syntax highlighting, autocomplete, and call tips
  • added "Global" and "Local" to syntax highlighting (grouped with commands - Keyword list 1)
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1 and v2 combined - 2020/03/08 - release 3

14 Mar 2020, 04:45

2020/03/14 Update:
  • added SetRegView, Run, RunWait, RunAs, Shutdown to command list for call tips
  • added Parse, Files, Reg to command list for call tips, but are filtered from KW_Cmd.txt list because these are Flow Control keywords
  • modified format for List_*.txt files
toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

25 Apr 2020, 12:56

Would it be possible to extend this script to allow to paste a full snippet and not only a single command?
E.g. when typing „Switch“ not Only Switch Expression but

Code: Select all

Switch Expression
{
  Case „result“:
  Case „result“:
  Default:
}
ciao
toralf
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

25 Apr 2020, 13:36

@toralf
should be possible using hotstrings. You're just looking for some quick auto-complete?
toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

27 Apr 2020, 03:22

I meant via the auto completion mechanism of npp. I didn’t find a way to add linebreaks or indentation to the output of the auto completion mechanism. Did you?
ciao
toralf
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

27 Apr 2020, 03:37

the only possible way that MIGHT work is to use 
. It works in making a multi-line description for call tips, but this might not work for auto-complete.

Are you trying to get a hotstring effect similar to AHK, but happening in NPP?
toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

27 Apr 2020, 05:12

In npp you can choose between different autocomplete when there are more options, e.g. different set of parameters or command options. But it is only for a single line of code. I would like to add an option to autocomplete also a code block. I do not want to have two different systems for autocomplete.
ciao
toralf
Beholder
Posts: 1
Joined: 17 Jun 2020, 15:28

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

17 Jun 2020, 15:38

Hi, your AHK NPP highliting fails at the ahk script of EitherMouse 0.81. Please check it out if you want, you can download EitherMouse ahk in the zip from their website: eithermouse.com

The other AHK NPP syntax highlighting from this forum works fine on the EitherMouse script: https://www.autohotkey.com/boards/viewtopic.php?t=50
User avatar
boiler
Posts: 6199
Joined: 21 Dec 2014, 02:44

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

17 Jun 2020, 19:05

@TheArkive, can this be used along with your other tool that you posted in the v2 section or would it interfere with it? Basically, I'd like to add v2 syntax highlighting to Notepad++ capability alongside your other tool.
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

18 Jun 2020, 01:57

@boiler
Yes you can use this, though i suggest not using the auto-complete / call tips in notepad++.
EDIT: I mean, it's not a good idea to use CallTipsForAll and notepad++ call tips / auto-complete at the same time.

@Beholder
Thanks, I know there are a few different keywords I've missed. Can you give a few examples of missed keywords? I'll check out eithermouse and see if I can see them too.

EDIT: Ah yes, strings, and handling `" for highlighting. I'll see what I can do, but I like my strings to be a different color. I actually never use `" specifically because of that. I usually use q := Chr(34) or something like that to use literal quotes.

EDIT: @Beholder
How does this syntax highlighting fail? The one you linked to (which i have used before, and is still good of course) does the same thing when `" is used. I only posted this one because I didn't see an AHK v1 and v2 combined version. That is what this is supposed to be.
Last edited by TheArkive on 18 Jun 2020, 08:57, edited 1 time in total.
toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

18 Jun 2020, 08:32

TheArkive wrote:
18 Jun 2020, 01:57
though i suggest not using the auto-complete / call tips in notepad++.
why?
ciao
toralf
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight / Auto-Complete / Function Hints - AHK v1/2 combined - 2020/03/18 - release 5

18 Jun 2020, 08:56

toralf wrote:
18 Jun 2020, 08:32
why?
Not trying to brag, but I think my call-tips / auto-complete are better. Notepad++ call tips don't easily support commands / functions / methods, specifically for AHK. Of course for other languages I would assume Notepad++ call-tips and auto-complete is perfectly fine.

EDIT: Specifically, I was referring to not using CallTipsForAll and Notepad++ call tips / auto-complete at the same time.

Didn't mean to make such a broad statement, I'll modify that. Thanks.
User avatar
boiler
Posts: 6199
Joined: 21 Dec 2014, 02:44

Re: Notepad++ Syntax Highlight - AHK v1/2 combined - 2020/06/18 - release 6

18 Jun 2020, 09:47

@TheArkive - Thanks. I thought it was all one package. I should have realized that it would just be an XML file that could be used independently of the other stuff. Works well. :thumbup:
toralf
Posts: 792
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: Notepad++ Syntax Highlight - AHK v1/2 combined - 2020/06/18 - release 6

18 Jun 2020, 11:00

I misunderstood your statement, sorry. I read it as if you said that call tips for all should not be used with npp. Glad, I was wrong
ciao
toralf
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight - AHK v1/2 combined - 2020/07/01 - release 8

01 Jul 2020, 07:18

2020/07/01 Update:
  • added new ControlGet / ControlSet commands and #Require directive for AHK v2-a113
  • added some missing Control... commands
User avatar
TheArkive
Posts: 351
Joined: 05 Aug 2016, 08:06
GitHub: TheArkive

Re: Notepad++ Syntax Highlight - AHK v1/2 combined - 2020/07/02 - release 8

02 Jul 2020, 04:20

For yesterday's post I forgot to upload the changes. They are now uploaded.
sdkyron
Posts: 36
Joined: 06 Aug 2018, 00:57

Re: Notepad++ Syntax Highlight - AHK v1/2 combined - 2020/07/02 - release 8

28 Jul 2020, 03:43

It's nice and all but when i import it and open an ahk script, it looks like this ?
Untitled.jpg
Untitled.jpg (82.59 KiB) Viewed 1741 times

Return to “Editors”

Who is online

Users browsing this forum: No registered users and 1 guest