News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
Vim syntax file
Author Message
Senior Member

Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: Vim syntax file

I've been gradually adding bits to the file as features are added to murgaLua and as I notice things I've overlooked, but one serious thing I've overlooked is that some functions can be used as a method by a named object. For example, here's a small piece from a script in Damn Small Linux:

timeserver = socket.tcp()
_,err = timeserver:connect(host,port)

The current syntax file properly matches socket.tcp, but the other functions are not matched. If it was socket.connect it would be matched, but instead the script uses timeserver:connect.

I believe I'm going to have to rethink my method of matching strings If I'm going to address these variables without making the file too huge.
Maybe I'll simplify it so that all keywords are matched regardless of their context. I've seen it done this way in other syntax files, where certain keywords are highlighted regardless of their context. I was trying to be specific so these words would not be highlighted unless they are technically supposed to be, but that's beginning to become more complex than I'd like.

02-29-2008 04:46 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Vim syntax file - mikshaw - 09-10-2007, 10:52 AM
RE: Vim syntax file - mikshaw - 09-11-2007, 05:42 AM
RE: Vim syntax file - mikshaw - 02-29-2008 04:46 AM
RE: Vim syntax file - mikshaw - 02-29-2008, 06:19 AM
RE: Vim syntax file - mikshaw - 10-23-2010, 02:20 PM
RE: Vim syntax file - mikshaw - 01-01-2011, 12:59 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: