Home Download Buy Blog Forum Support

Determine syntax based on file name *prefix*?

Determine syntax based on file name *prefix*?

Postby hibbelig on Thu Jan 12, 2012 10:14 am

Hi,

I'm working with files in an XML dialect. I've got a specialized language for it. All the file names in that dialect start with "a_" and end with ".xml". Is it possible to auto-select my language for all files named "a_*.xml" without selecting my language for all "*.xml" files?

Thanks,
Kai
hibbelig
 
Posts: 77
Joined: Wed Dec 21, 2011 11:24 pm

Re: Determine syntax based on file name *prefix*?

Postby aparajita on Thu Jan 12, 2012 11:49 am

This fork of the SetSyntax plugin will allow you to specify a regular expression when matching filenames:

https://github.com/schovi/SetSyntax

This will be rolled into the main plugin eventually.
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm

Re: Determine syntax based on file name *prefix*?

Postby aparajita on Wed Jan 25, 2012 8:03 pm

SetSyntax has been retired, use DetectSyntax instead, it uses regex for matching and is much more powerful.
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm


Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 27 guests