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 

syntax highlighting for VIM-Editor ?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
dirk
Guest





PostPosted: Wed Feb 16, 2005 10:19 pm    Post subject: syntax highlighting for VIM-Editor ? Reply with quote

Hi there,

I am missing syntax highlighting for Autohotkey
in my favorite texteditor VIM.

Perhaps anyone can help ?

thanks
d i r k
Back to top
ranomore



Joined: 06 Nov 2004
Posts: 178
Location: Salt Lake City, UT

PostPosted: Thu Feb 17, 2005 6:16 am    Post subject: Reply with quote

It's really a three-step process:
1) there is a command list in your Program Files\AutoHotkey directory. That is your source file (updated with each release, I think);
2) Look for an example syntax file in your VIM directory, and learn how it works;
3) Write an AHK script that converts the AHK command list to a VIM syntax file.

4) Post your excellent work!

I know that's more than three steps Wink
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
toralf_as_guest
Guest





PostPosted: Thu Feb 17, 2005 10:38 am    Post subject: Reply with quote

HI,

Instead of writting your own script that does the conversion you can also look at other scripts that do the thing for other editors. E.g. the one from Rajat (for PSPad if I'm not mistaken, it comes with AHK) or from Tekl or me (toralf) (both for UltraEdit, search forum for UltarEdit).
Just alter the sections where the syntax of VM kicks in.
Back to top
Guest






PostPosted: Thu Feb 17, 2005 8:22 pm    Post subject: Reply with quote

Thanks,

I didn't think of Step 3 (conversion script) - good Idea.

I'll give it a try.


But, I'm absolute beginner to AutoHotkey
and have no knowledge to VIM-syntaxhighlighting so far....
Embarassed

d i r k
Back to top
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Thu Feb 17, 2005 10:45 pm    Post subject: Reply with quote

I forgot the exact name, but I think the help file ":syn-file" is what you're looking for. Not sure, haven't used it in a while.
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Feb 18, 2005 3:24 pm    Post subject: Reply with quote

There is a syntax file for autoit and it may be similar in some respects to autohotkey. Maybe you can just tweak it.

Here is the link -> http://www.vim.org/scripts/script.php?script_id=968
Back to top
e2e4



Joined: 20 Feb 2005
Posts: 4

PostPosted: Mon Feb 21, 2005 8:41 am    Post subject: Reply with quote

I did try this one, but no success.
Back to top
View user's profile Send private message
ranomore



Joined: 06 Nov 2004
Posts: 178
Location: Salt Lake City, UT

PostPosted: Mon Feb 21, 2005 8:56 am    Post subject: Reply with quote

I dunno. The way VIM highlights looks a lot more complex than how, say, EditPlus highlights. What would you get if you were to search for au3 and replace it with ahk throughout the file?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Mon Feb 21, 2005 5:40 pm    Post subject: Reply with quote

An AutoIt3 file would do you about as much good as a Perl file. You're thinking of AutoIt2, which is what AHK is based on. Neither AU2 nor AHK bear any resemblance to AutoIt3 syntax.
Back to top
View user's profile Send private message
savage



Joined: 02 Jul 2004
Posts: 206

PostPosted: Mon Feb 21, 2005 7:09 pm    Post subject: Reply with quote

VIM syntax highlighting is complicated, but much more powerful than any syntax highlighting engine I've ever seen (save emacs I guess). I haven't got a clue how it works though :p. I'm still a beginner to VIM and don't really know any of the scripting side of it.
Back to top
View user's profile Send private message AIM Address
ranomore



Joined: 06 Nov 2004
Posts: 178
Location: Salt Lake City, UT

PostPosted: Mon Feb 21, 2005 7:09 pm    Post subject: Reply with quote

Embarassed Assumptions, Assumptions Embarassed
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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