AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AHK editor with code collapse and hyperlinking?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
Ace_NoOne



Joined: 10 Oct 2005
Posts: 333
Location: Germany

PostPosted: Fri Nov 17, 2006 9:10 am    Post subject: AHK editor with code collapse and hyperlinking? Reply with quote

Hey guys,

I know the "favorite editor" issue has been discussed a couple of times already, but I still haven't really found a satisfactory answer so far.
Currently I'm using PSPad, and while it's certainly a great program, there's three things I don't like about it:
  1. it's not lightweight (resource- and interface-wise)
  2. it doesn't support collapsing code blocks (i.e. reducing the displaying of functions/subroutines to their headers)
  3. it does not support hyperlinking (e.g. clicking on a function's name in the code will take you to its definition)
Is there any editor that would pass those criteria?
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Fri Nov 17, 2006 9:50 am    Post subject: Reply with quote

SciTE is close to that:

1) It is below 1MB (no UPX here).

2) It supports code block collapsing (block comments, continuation sections, and of course braces). Of course, you need my special SciLexer.dll, as it is not yet integrated to the official distribution (I should rework on the lexer).

3) Uh, not that. Well, there is a script to do that, isn't it? Note that SciTE supports kind of hyperlinking: #Include FooBar.ahk, put cursor on the file name, hit Ctrl+Shift+O, it opens the file. Same for URLs.
Note that I still think that function definitions are hard to find (distinguish from calls) in AHK.
But now we have regular expressions in AHK, perhaps I should write a script specific to SciTE (or generic if just parsing a text file) to list functions in a project.

The only point that can annoy users is the settings: it is powerful, but you have to tweak a text file, no fancy dialog, no auto-save.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Ace_NoOne



Joined: 10 Oct 2005
Posts: 333
Location: Germany

PostPosted: Fri Nov 17, 2006 10:19 am    Post subject: Reply with quote

I'm familiar with and quite fond of SciTE - in fact, I use it as a Notepad replacement for some tasks.
However, I never got AHK working in SciTE; while I don't mind the text settings, I didn't know how to do anything beyond changing the most basic settings.
So thanks for your link there, I'll definitely check that out!

The hyperlinking would definitely be a nice thing to have though... Smile
Back to top
View user's profile Send private message
POINTS



Joined: 18 Jan 2006
Posts: 283

PostPosted: Sat Nov 18, 2006 2:38 am    Post subject: PSPad or another? Reply with quote

I'm using PSPad right now too and have the same problems. PSPad has A LOT of features but crashes a lot for me...

I think an editor should have these characteristics:
1) Not crash!
2) Open Source
3) Syntax highlighting
4) Ability to add your own java scripts to it
5) Line manipulation (such as add to the beginning of every line) and column select
6) Project files
7) Good Find/Replace functions

PSPad crashes and I don't think is open source but you can do all of the other things plus much more (even diff to files).

Scite looks good though. I'll give it a shot. Any other programs? Or is that the best one?
_________________
My AutoHotkey Program for Warcraft III:
Warkeys
http://warkeys.sourceforge.net/

Remap your hotkeys
Healthbars always on
Remap inventory
Back to top
View user's profile Send private message Visit poster's website
tekNerd



Joined: 27 Mar 2006
Posts: 5

PostPosted: Sat Nov 18, 2006 4:39 am    Post subject: Reply with quote

Notepad++ ?
_________________
http://sharpe-shell.org
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Sat Nov 18, 2006 9:35 am    Post subject: Reply with quote

Notepad++ is based on Scintilla, the source code editor component that is also used in SciTE (Scintilla-based Text Editor), which was initially a demonstration/testbed of the later...
So it will have automatically some goodies like code folding, column select, base regex.
Problem: it won't highlight correctly AHK code, unless you recompile it.
I think it can do base highlighting though.

POINTS, SciTE has indeed most of your... points. It never crashed on me. Well, it did, when I developped a new feature. Or if it did, I debugged it and corrected it. Stability is very important for the project owner and the developpers.

Item 4: No JavaScript scripting, but Lua, much lighter, very powerful, easy to learn. I will soon give here a script listing all AutoHotkey function definitions in the current buffer, I just wrote the same in AutoHotkey and the regexes are simple enough to be rewritten easily in Lua.
Item 6: SciTE is a pure text editor, no concept of project files. I don't miss that. Even less in AHK. Still, it is easy to open an included file.
Item 7: It is relatively complete here.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
wtg



Joined: 04 Oct 2006
Posts: 60
Location: Louisville, KY

PostPosted: Wed Nov 22, 2006 3:08 pm    Post subject: Reply with quote

My favorite is UltraEdit (www.ultraedit.com). It's not open source or freeware, but it's shareware and quite inexpensive - $39.95 US.

Functions aren't hyperlinked, but it displays your codes functions in a list box to the right of the editor and clicking on one instantly takes you too it, plus the list always highlights the function your cursor is in.

It does a lot of things very well and very fast: syntax highlight, code-folding, column-mode editing, integrated FTP, HTML toolbars, regular expressions, projects, templates, too much to list really. Here's a link to full feature list: http://www.ultraedit.com/index.php?name=UE_MoreFeatures

It's frequently updated - one new major release a year - and well supported. I've been using it about 7 years now.
Back to top
View user's profile Send private message
Mistrel



Joined: 12 Sep 2005
Posts: 187

PostPosted: Thu Nov 23, 2006 4:09 am    Post subject: Reply with quote

My biggest gripe is not being able to list my scripts functions and subroutines. I find that I waste a lot of time hunting for them in my script.
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Thu Nov 23, 2006 10:43 am    Post subject: Reply with quote

List functions (+ labels + hotstuff) in an AutoHotkey script
I am rewriting it in Lua to use it directly in SciTE.

[EDIT 2006/11/25] Done! That's not really hyperlinking, but you get a kind of menu with the list of functions, labels and hotstuffs. Double-click on the item of your choice and you go there!
Well, I just think I can also make a hotkey to jump on the definition of the function call on which the caret is. Will work on this idea too.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
MisterW



Joined: 20 Jul 2005
Posts: 65

PostPosted: Fri Dec 15, 2006 9:33 pm    Post subject: Reply with quote

Vim does all these.....but it might take a long time before you can Smile
Back to top
View user's profile Send private message
urlwolf



Joined: 16 Mar 2006
Posts: 100

PostPosted: Mon Dec 31, 2007 4:47 pm    Post subject: Reply with quote

Agreed, Vim does that (hyperlinking).
But so does any editor with support for ctags (e.g., ultraedit, slickEdit, xemacs, multiedit2006).

We need to have ctags support for ahk, otherwise this is not possible.

Read about ctags here:
http://ctags.sourceforge.net/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group