Home Download Buy Blog Forum Support

Extend syntax definition from User folder

Extend syntax definition from User folder

Postby FalconNL on Mon Feb 16, 2009 11:20 pm

Today I tried to extend the syntax file for Haskell programs, as it's missing a few things (specifically pragmas and integer/float literals).
Now obviously I could modify the Haskell.tmLanguage file in the Haskell folder, but that means the file could be overwritten by a future Sublime version, plus backing up all my changes becomes more complex than just copying the User folder.
I tried making a new Haskell.tmLanguage file in the User folder, but that seemed to have no effect.
Is there any way of extending/overwriting a syntax definition from the User folder?

Thanks in advance.
Posts: 65
Joined: Thu May 29, 2008 8:17 pm

Re: Extend syntax definition from User folder

Postby jps on Tue Feb 17, 2009 1:22 am

Your best bet is to create a syntax definition file with a new name, perhaps 'Haskell Enhanced', and then associate *.hs files with that syntax (Click on the syntax entry in the status bar and choose 'Open all with current extension as...').
Site Admin
Posts: 3217
Joined: Wed Mar 19, 2008 12:33 pm

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot] and 35 guests