AutoHotkey Community

It is currently May 25th, 2012, 4:46 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 123 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject:
PostPosted: May 13th, 2007, 12:08 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Thanks for the clarification. I understood from Skans post that it is possible. I was wrong. Thanks, that saved me some hours testing. Is there a multitab editor that can be used with your lexer?
I'll take a look at Scintilla. Does it have multitabs?

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2007, 10:32 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
A small improvement to the ahk1.properties file:
Code:
# Command to run script (F5)
command.go.$(file.patterns.ahk)="$(autohotkeydir)\AutoHotkey.exe" /ErrorStdOut "$(FileNameExt)"
This will show the error messages in the SciTE window and not as an popup message window.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2007, 10:42 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Your screenshot looks much more colorful then the SciTE window I have in front of me. Do I have to edit the ahk1.properties file to change it? How should I do it? I also noticed that your code folding symbols look differently then the one I see. Maybe because I use version 1.73.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 14th, 2007, 9:12 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
OK, that's three messages to answer... :-)

Quote:
"multitab editor that can be used with your lexer"
You found it, it is called SciTE, not Scintilla, which is the main component used by SciTE (Scintilla Text Editor, initially just a demo of Scintilla, now much more).

Quote:
/ErrorStdOut
Good idea, I will add to the file to download. Alas the error format isn't recognized by the error line lexer (in LexOthers.cxx). Looking at the searched format, I found a simple workaround: just add a space before the colon after the line number, and SciTE will take it as a Microsoft error, so double-clicking on the line will open the file and go to the line with error.

Quote:
Do I have to edit the ahk1.properties file to change it?
No, perhaps you forgot to add the import ahk1 to the SciTEUser.properties file.
Or the standard colors probably differs from mine, which I tweak from time to time:
Code:
colour.code.comment.box=fore:#7070A0
colour.code.comment.line=fore:#8080A0
colour.code.comment.doc=fore:#0000A0
colour.text.comment=fore:#0000FF,back:#D0F0D0
colour.other.comment=fore:#007F7F
colour.embedded.comment=back:#E0EEFF
colour.notused=back:#FF0000

colour.number=fore:#D000FF
colour.keyword=fore:#0055AA
colour.string=fore:#8000FF
colour.char=fore:#008040
colour.operator=fore:#C07040
colour.preproc=fore:#A00070
colour.error=fore:#FFFF00,back:#FF0000
Rendering can also change with the monitor, the view angle, and so on.

Quote:
I also noticed that your code folding symbols look differently then the one I see.
I use fold.symbols=2

_________________
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 14th, 2007, 10:50 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
thanks a lot.
I'm currently wading through the SciTE documentation. Please see also my post in the ask for help section on how to direct SciTE from within AHK.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 3:35 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
PhiLho wrote:
Quote:
/ErrorStdOut
Good idea, I will add to the file to download. Alas the error format isn't recognized by the error line lexer (in LexOthers.cxx). Looking at the searched format, I found a simple workaround: just add a space before the colon after the line number, and SciTE will take it as a Microsoft error, so double-clicking on the line will open the file and go to the line with error.
Dear PhiLho, could you please tell me what different formats the error line lexer can read?

I'm planing to inject some lines into the output pane. These lines represent the certain lines of code in the file with their line numbers. I wantto give the user the ability to jump to these lines by just clicking in the output pane. But it is too difficultto guess the correct format, so that the error lexer understands them.

Thanks a lot.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 4:12 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Raw from the LexOthers.cxx source code:
Code:
      // Look for one of the following formats:
      // GCC: <filename>:<line>:<message>
      // Microsoft: <filename>(<line>) :<message>
      // Common: <filename>(<line>): warning|error|note|remark|catastrophic|fatal
      // Common: <filename>(<line>) warning|error|note|remark|catastrophic|fatal
      // Microsoft: <filename>(<line>,<column>)<message>
      // CTags: \t<message>
      // Lua 5 traceback: \t<filename>:<line>:<message>
Plus some other formats with textual content, for example:
Code:
File "Foo", line 555 (Python)
Error xxx in Foo on line 555 (PHP)
line 840 column 1 (HTML Tidy)
In red, the relevant strings. If they are at start of line, they must remain this way. You can test just by typing a string in the Output pane.

_________________
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 23rd, 2007, 4:24 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Thanks a lot for the quick reply.

The
Code:
line 220 column 1 (HTML Tidy)
is close to what I need. Since all the lines are in the same file, I do not want to put the filename into every line. Unfortunately it doesn't work without the "column \d+". PSPad just uses
Code:
<filename>
<line>: <message>
which is very elegant, since it is good to read. If there are things in multiple files on multiple lines. it is
Code:
<filename>
<line>: <message>
<line>: <message>
<line>: <message>
<filename>
<line>: <message>
<line>: <message>
<line>: <message>
Is this possible in SciTE too?

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2007, 5:07 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Something close to your needs, then, is the GCC format:
filename:1400:error message
Note that the filename can be anything, if not found, SciTE just use the current buffer and jumps to the given line.
For example, .:1400: error just works.

_________________
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 23rd, 2007, 5:47 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Code:
line <line> column <column> <message>

has the advantage of highlighting the text from column to the end of line. But thanks for your insight. I made notes. For the time being I stick with the above.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 7th, 2007, 2:04 pm 
Offline

Joined: April 25th, 2007, 10:13 pm
Posts: 29
Greetings PhiLho/Toralf and others,

I did not realize there is another topic on Notepad++ here. While I like the syntax highlighting, the function list plugin is way more powerful, it allows one to browse the code efficiently.

The following is the screen shot, you can see the function list on the right side panel. What's useful is not simply the list of functions (notice I have customized it to recognize the include directive as well, by the way, in Notepad++, one can highlight the included filename, hit a hotkey Alt+F5 to open that file???), one can also double click on the function name, it will automatically go to the begining of the function (subroutine) definition:

Image

In terms of Syntax Highlighting/Folding feature, I would like to see the provision of Subroutine folding, currently, the UserDefineLang.xml can do the folding for function fairly well, but not for subroutines.

In the above screenshot, you can notice that in the bottom, I made a dock window (based on majk..'s dock), which displayed some file info, there are also four text button on the right bottom: R/W, Load, 2Dir, Explorer, these are quick buttons to toggle the read/write attribute of the edited file, Load the script if it is AHK script, Goto the command window of the directory where the edited file resides, Explorer the directory where the edited file resides. Quite handy for myself.

Let me know PhiLho when you are ready to make improvement on your lexer, I am willing to test it. Toralf, I realized that you are ready to try Notepad++, have you tried it yet?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 12th, 2007, 1:23 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Dear mosaic,
I think I will use SciTE, when the lexer is done. It has most of the features I need.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Sc1 <--
PostPosted: October 6th, 2007, 1:42 pm 
is it possible to decompile sc1 replace SciTEGlobal.properties and edit the lexer to add ahk support, then compile it back again with Philhos SH and my personal prefs?

i want the other SH's in thats default in Sc1


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 5th, 2007, 5:04 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
No need to decompile...
The source distribution should provide everything needed to compile Sc1 from scratch.

_________________
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: November 25th, 2007, 12:04 am 
ok i guess i could try rtfm, it seems hard. does it start from what sc1.exe is configured to or do i need to read about every single setting to set it up?

I like the sc1 that is already compiled but would like to change/add a couple of things.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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