Home Download Buy Blog Forum Support

tmLanguage file that doesn't show up on the Languages menu?

tmLanguage file that doesn't show up on the Languages menu?

Postby JoaoMartins on Sun Dec 02, 2012 11:02 pm

Hi,

Is it possible to create a tmLanguage file that doesn't show at the languages menu for sole purpose of being included in other tmLanguage files?

Thanks,
Joao
JoaoMartins
 
Posts: 8
Joined: Fri Nov 30, 2012 10:21 am

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby jps on Mon Dec 03, 2012 1:56 am

Unfortunately not
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby nick. on Mon Dec 03, 2012 3:06 pm

I haven't tested this, but couldn't you create a tmLanguage file and add it to the ignored packages list? It should still be include-able, no?
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby JoaoMartins on Mon Dec 03, 2012 4:57 pm

nick. wrote:I haven't tested this, but couldn't you create a tmLanguage file and add it to the ignored packages list? It should still be include-able, no?


Actually I have tried that and the package is disabled even for includes :(

Thank you for your replies.
JoaoMartins
 
Posts: 8
Joined: Fri Nov 30, 2012 10:21 am

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby bronson on Tue Dec 04, 2012 1:19 am

How about calling it .hidden-tmLanguage? Dunno if it would work the same as tmTheme but one can hope...

This is how tmTheme works:
https://github.com/maltize/sublime-text ... 65144349d9
https://github.com/maltize/sublime-text ... a59e8c53e1
bronson
 
Posts: 38
Joined: Wed Nov 28, 2012 8:52 pm

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby JoaoMartins on Tue Dec 04, 2012 9:32 am

bronson wrote:How about calling it .hidden-tmLanguage? Dunno if it would work the same as tmTheme but one can hope...

This is how tmTheme works:
https://github.com/maltize/sublime-text ... 65144349d9
https://github.com/maltize/sublime-text ... a59e8c53e1


Humm, how do I include other tmLanguage file by it's file name, I thought it was only possible by the scopeName?
And with the extension of .hidden-tmLanguage, I doubt it would even be processed by sublimetext and it's scope added!

Your example uses python and there's no python here in this, only tmLanguage files (XML) that include other tmLanguage files.

Thanks
JoaoMartins
 
Posts: 8
Joined: Fri Nov 30, 2012 10:21 am

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby bronson on Tue Dec 04, 2012 5:36 pm

Yeah, I think you're right -- it won't work for tmLanguage. It was a longshot.

Time to file a feature request?
bronson
 
Posts: 38
Joined: Wed Nov 28, 2012 8:52 pm

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby JoaoMartins on Wed Dec 05, 2012 10:29 am

Maybe, I would definitely agree with such feature although I don't know if by adding such option inside the tmLanguage file, it would be feasible as it could break compatibility of the tmLanguage files with TextMate and they're supposed to be interchangeable!

One way I could see it happen, was by creating a small python plugin that would take a list of names from a json file and remove corresponding entries from the languages menu.
Just a thought! :roll:
JoaoMartins
 
Posts: 8
Joined: Fri Nov 30, 2012 10:21 am

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby FichteFoll on Sat Dec 08, 2012 2:25 am

I am pretty sure that this does work, using the ".hidden-tmLanguage". Take a look at "Packages/Default/Find Results.hidden-tmLanguage".

You then can not use the popup menu from ST's status bar to change the syntax to that file, instead you'd need to do that with a plugin or by hand in the console.

Edit: disregard this, I can't read.
Last edited by FichteFoll on Sat Dec 08, 2012 2:34 am, edited 1 time in total.
FichteFoll
 
Posts: 406
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: tmLanguage file that doesn't show up on the Languages menu?

Postby jps on Sat Dec 08, 2012 2:27 am

You can make .tmLanguange files that won't show up in the Syntax menu by changing the extension, but then they won't be available for inclusion into other .tmLanguage files.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Next

Return to Technical Support

Who is online

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