AutoHotkey Community

It is currently May 27th, 2012, 8:42 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 123 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 9  Next
Author Message
 Post subject:
PostPosted: May 9th, 2006, 11:15 am 
PhilHo wrote:
Quote:
Perhaps using a Notepad2 base: small*, a bit rustic (tried it only briefly!) although friendlier than SciTE, open source, so not too hard to adapt
Exactly what I've wanted to point out. Thx for your confirmation. :D

* a single executable


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2006, 11:27 am 
In case someone is able to deal with implementing PhilHo's lexer:
Quote:
Could you please explain how to add or modify syntax schemes?

This requires modification of the Notepad2 source code.

The Scintilla documentation has an overview of syntax highlighting, and how to write your own lexer, in case the language you'd like to add is not supported by Scintilla.

The structures relevant to syntax highlighting can be found in Styles.c of the Notepad2 source code. Add your own structures to the global pLexArray, then adjust NUMLEXERS to the total number of syntax schemes. The style definitions can be found in SciLexer.h of the Scintilla source code.

Include the Lex*.cxx files from Scintilla required for your languages in your project and follow the instructions in Readme.txt to rebuild Notepad2. I recommend using Visual Studio .NET 7 or above.

[Notepad2 1.0.12 Source Code]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2006, 11:54 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Goyyah wrote:
    It will be very helpful to the community if you can

  • Recompile Notepad++ to automatically support AHK Syntax Highlighting
  • Provide a download in .ZIP format ( requiring no installation )
  • .REG files to associate Notepad++ to be the default editor for AHK
Notepad++ uses regular SciLexer.dll, so replacing the provided one with mine and replacing two XML files should do the trick (once I finished doing that). No need for recompiling it. That's Notepad2 which needs recompiling. And I won't do it, I prefer to spend my scarce free time to improve the lexer (and do other projects).
[EDIT] My bad, both need recompiling, see below!

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Last edited by PhiLho on May 9th, 2006, 2:10 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2006, 12:25 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Dear PhiLho, :)

You wrote:
Notepad++ uses regular SciLexer.dll, so replacing the provided one with mine and replacing two XML files should do the trick (once I finished doing that). No need for recompiling it.


And will that add AHK to the Languages Menu? :shock:

Image

Thanks!. Awaiting eagerly :D

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2006, 1:00 pm 
Quote:
That's Notepad2 which needs recompiling. And I won't do it, I prefer to spend my scare free time to improve the lexer (and do other projects).
Fair enough :wink:

(Scare free time or spare free time - that's the question! (Hamlet) :))


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2006, 1:12 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
BoBo wrote:
(Scare free time or spare free time - that's the question! (Hamlet) :))


I guess it should have been "Scarce free time" :)

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2006, 2:37 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Ehe, a c has been lost, indeed!

I made a sad discovery, Goyyah was right, Notepad++ needs to be recompiled too.
While the stylers.xml and langs.xml files looked like the program was flexible, looking in the sources to see why I didn't saw AutoHotkey in the language menu (as shown by Goyyah), I saw that author, for some reason, hard-coded the language lists in several places!
I don't understand this choice that forbid using less common languages already supported by Scintilla. Being more flexible wouldn't cost probably much. Of course, replacing its SciLexer.dll by a standard or customized one might break some features (perhaps the line draw mode, perhaps the user defined one) and would bloat it (since this is a subset of languages, it is smaller than standard one). But I am still disappointed.

Well, perhaps you can petition the author:
1) To be more flexible;
2) (more likely) To support AHK.
I still have the above XML files, in case they become useful someday.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2006, 2:54 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Dear PhiLho, :)

You wrote:
Well, perhaps you can petition the author:
1) To be more flexible;
2) (more likely) To support AHK.
I still have the above XML files, in case they become useful someday.


:( :cry: :(

As BoBo requested, maybe someday you should re-compile Notepad2 atleast.

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Update 1
PostPosted: May 10th, 2006, 11:57 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
First update, see first post to see what is changed: various bug fixes, functionnal folding.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2006, 12:52 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Goyyah wrote:
As BoBo requested, maybe someday you should re-compile Notepad2 atleast.
Not me, sorry.
I downloaded the source of Notepad2, out of curiosity, and I saw it is even worse (read: less flexible) than Notepad++, in the sense that keywords and styles are hard-coded in the source code, so it seems very hard to alter them (style are overridable, but I saw no way to add or change keywords).

Again, I won't do it, but it shouldn't be such a hard task to upgrade these editors.

For Notepad++, I wrote a message in their forum, asking for more flexibility or perhaps future AHK support.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2006, 12:56 pm 
@ PhiLho
I'm fine with that and I really appreciate your effort to provide an AHK lexer. Thx mate. :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2006, 6:08 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
PhiLho wrote:
For Notepad++, I wrote a message in their forum, asking for more flexibility or perhaps future AHK support.


I have sub-posted : http://sourceforge.net/forum/message.php?msg_id=3722727

Anybody else willing?

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2006, 1:54 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
@PhiLho: Nice work on the lexer :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2006, 10:13 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Dear PhiLho, :)

You wrote:
In your post

Well, perhaps you can petition the author:
1) To be more flexible;
2) (more likely) To support AHK.
I still have the above XML files, in case they become useful someday


I do not how but AHK shows in the bottom of the "Languages Menu"

Image

Can I have a copy of those XML Files.. Please!

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2006, 1:30 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
They are stylers.xml and langs.xml, with only the AHK definitions, ie. they have to be merged in the existing files.

But I think you only created a User Defined language, and you already have the corresponding syntax files in %A_AhkPath%\Extras\Editors\Notepad++\

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 123 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 9  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group