Home Download Buy Blog Forum Support

Makefile syntax highlighting with multiple targets [PATCH]

Makefile syntax highlighting with multiple targets [PATCH]

Postby asmodai on Mon Apr 12, 2010 2:21 pm

With the Makefile syntax you get highlighting for:

Code: Select all
blah: stuff to do

but not for the valid syntax of multiple targets on the same line:

Code: Select all
all build: stuff to do


(Need to get myself acquainted with the syntax highlighting format used by Sublime Text to fix both this and the Python nit I reported a while ago. So in lieu of not having an official bugtracker, consider it also a placeholder. ;) )
Last edited by asmodai on Mon Apr 19, 2010 12:09 pm, edited 1 time in total.
asmodai
 
Posts: 73
Joined: Mon Mar 01, 2010 10:42 am

Re: Makefile syntax highlighting nit with multiple targets

Postby asmodai on Mon Apr 19, 2010 12:08 pm

Ok, so in Makefile.tmLanguage we need to change

Code: Select all
         <key>match</key>
         <string>^([^\t ]+:(?!\=))\s*.*</string>
         <key>name</key>
         <string>meta.function.makefile</string>

to

Code: Select all
         <key>match</key>
         <string>^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.*</string>
         <key>name</key>
         <string>meta.function.makefile</string>
asmodai
 
Posts: 73
Joined: Mon Mar 01, 2010 10:42 am

Re: Makefile syntax highlighting with multiple targets [PATCH]

Postby jps on Tue Apr 20, 2010 1:22 pm

I'll add this patch into the next beta - thanks
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Makefile syntax highlighting with multiple targets [PATCH]

Postby asmodai on Tue Apr 27, 2010 1:25 pm

Thanks for applying jps.

Small nit, you reversed the mo in my nickname in the attribution. ;)
asmodai
 
Posts: 73
Joined: Mon Mar 01, 2010 10:42 am

Re: Makefile syntax highlighting with multiple targets [PATCH]

Postby jps on Tue Apr 27, 2010 1:28 pm

asmodai wrote:Small nit, you reversed the mo in my nickname in the attribution. ;)


Oops, fixed now!
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 4 guests