Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

LexAHK: syntax highlighting for Scintilla (SciTE, others?)


  • Please log in to reply
65 replies to this topic
SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
Dear PhiLho, :)

stylers.xml and langs.xml


I am not able to browse the above files. Please check the files.

Regards, :)
kWo4Lk1.png

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

I am not able to browse the above files. Please check the files.

Add "</LexerStyles>" before "</NotepadPlus>" right towards the end of stylers.xml and "</Languages>" for langs.xml.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Titan is right.
I updated the file, even if they don't want to be standalone XML files but more stuff to be copied/pasted into the files provided with the editor:
the <Language name="autohotkey" ... </Language> part in langs.xml,
and the <LexerType name="ahk" ... </LexerType> part in stylers.xml.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

SKAN
  • Administrators
  • 9115 posts
  • Last active:
  • Joined: 26 Dec 2005
Dear Titan & PhiLho, :D

Thanks!

Regards, :)
kWo4Lk1.png

Ursu
  • Guests
  • Last active:
  • Joined: --

Dear PhiLho, :)

...

It will be very helpful to the community if you can

[*:29hge3o5].REG files to associate Notepad++ to be the default editor for AHK
Hope my request is not immoderate. ( This is one nice thing that can happen to AHK & the Community. )

Regards, :)


I was reading this to see what to change so that when I right click on an AHK fine and select "Edit", it opens the script with Notepad++ instead of Notepad.

But since the answer wasn't here, I found one, and these are the steps to whoever is interested:

1. Run regedit
2. Go to: HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command
3. Change the value of the key to path to notepad++/notepad++.exe

Hope this helps someone :)[/i]

Ursu
  • Guests
  • Last active:
  • Joined: --
Actually, don't forget to include the "%1" %* at the end, I forgot to mention that. So the value should look something like this:

"C:\Program Files\Notepad++\notepad++.exe""%1" %*

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Oh, sorry, I forgot the request. See more information at: AHK.reg: registry settings if you didn't installed AHK.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

nick
  • Members
  • 549 posts
  • Last active: Jul 03 2010 09:31 PM
  • Joined: 24 Aug 2005
Dear PhiLho,

I lost some time trying to configure SciTe for AHK on my own. Now I found your lexer and properties files and they do nearly all what I tried to get.

But trying to change the original akh.properties and comparing it with other properties files I found some maybe useful statements to add to the ahk.properties:

file.patterns.ahk=*.ahk
[color=blue]filter.ahk=AutoHotKey (ahk)|$(file.patterns.ahk)|[/color]
lexer.$(file.patterns.ahk)=ahk

calltip.ahk.parameters.start= (,

[color=blue]autocomplete.ahk.ignorecase=1
autocomplete.ahk.start.characters=$(chars.alpha)$(chars.numeric)$_@#
[/color]
word.chars.ahk=$(chars.alpha)$(chars.numeric)_$#@?[]

The first one provides a SciTe-like filter for the open file dialogue, the others make autocompletion work (if autohotkeydir is set correctly). I like this and maybe some others too.

At last I suggest to include the lexer, the properties and a brief HowTo into the official download version.


Thank's a lot!

dwuttke

BoBo
  • Guests
  • Last active:
  • Joined: --
Hallo 'd' (wuttke) :)
siehst du ne Möglichkeit (d)einen Lexer in [Notepad2] (=SciTe basierend) zu implemetieren und diesen Editor der AHK Community zu "spenden".
Quasi als AHK - Default Editor (final mit AHK gebundled) ... :D

Evtl, "unnötige" Dialekte eliminieren um Notepad2 dabei klein zu halten ??
Danke. 8)

corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004
@BoBo: Would you mind rephrasing that in english since this is an english forum? (it doesn't seem to translate well...)

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

But trying to change the original akh.properties and comparing it with other properties files I found some maybe useful statements to add to the ahk.properties

Oops, I added a $(filter.ahk)\ line in my open.filter variable, but I forgot to define it! Actually, I never use the Open command, either opening from context menu or drag'n'drop. But thanks for reminding.

The ignorecase, I omitted it, because I always type with the exact case, but it is useful and in the spirit of AHK. The start.characters, I reduced it to $(chars.alpha)# because that's the only official chars in the API. If somebody adds some more exotic personal names to the API file, it will add the needed chars. Otherwise, I would change it to just $(word.chars.ahk).

Good suggestions, I updated the file. Thanks.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

ahklover
  • Members
  • 4 posts
  • Last active: Sep 26 2006 12:17 AM
  • Joined: 16 Sep 2006
I finally got the SH work for AHK files in SCITE.
But, I could never get SH work for AHK files in Notepad++.

I have copied the new DLL.

Still no luck.
Any suggestions?

Thank you.

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
What is a SH?
Perhaps you missed information in the middle of the topic (2nd page):

I made a sad discovery, Goyyah was right, Notepad++ needs to be recompiled too.

See the relevant message for more info. In short, author has hard-coded the list of available languages, so AHK cannot be added as is, needs to be modified and recompiled.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
I guess SH is "syntax highlight"
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

ahklover
  • Members
  • 4 posts
  • Last active: Sep 26 2006 12:17 AM
  • Joined: 16 Sep 2006
SH is Syntax Highlighting (as mentioned in my posting's subject).
Thanks for the info.

I did notice the message about recompiling Notepad++.
But, then, I saw the message from Goyyah about AHK appearing in the Language Menu and a (your?) reply to that. That's when I found the Syntax Highlighting AHK file in my Editors\Notepad++ folder.
I tried running it expecting it to enable SH and it did not do it.
That's why I wrote that.
I am using PSPad now (for editing AHK files).

What is a SH?
Perhaps you missed information in the middle of the topic (2nd page):

I made a sad discovery, Goyyah was right, Notepad++ needs to be recompiled too.

See the relevant message for more info. In short, author has hard-coded the list of available languages, so AHK cannot be added as is, needs to be modified and recompiled.