Sublime Forum

How to set variables like TM_XHTML?

#1

Hi,

I’m using the HTML bundle and by default it does not generate XHTML code. It does when the variable TM_XHTML is set to “/”.
it is explained here: raven-seo-tools.com/blog/2949/ho … n-textmate

Well… i don’t know how to continue with that. Is it possible in sublime? Am I missing something?

Any help is appreciated.

Thanks in advance.
Santi

0 Likes

#2

I don’t think you can set any TM variables right now with the exception to “some” of them for snippet functionality ex: TM_SELECTED_TEXT

anyways, I am guessing you are referring by default sublime doesn’t close single tags such as BR and IMG or INPUT, easy fix just edit the following file
%AppData%\Sublime Text\Packages\HTML\unclosed tag.sublime-snippet
put this in there

<snippet> <content>&lt;${PARAM1} /&gt;$0</content> </snippet>
*
Notice the “/” before the >*, now it will insert the
:wink:
and all of these tags too: br|button|embed|hr|input|meta|option|param

You might be interested in the following plugins, I highly recommend 'em :smile:

bitbucket.org/sublimator/webdeve … /wiki/Home
bitbucket.org/sublimator/zencoding/wiki/Home

0 Likes

#3

Really thanks a lot. :smile:

This editor is getting even better everyday. WOW!

0 Likes

#4

[quote=“landtax”]Really thanks a lot. :smile:

This editor is getting even better everyday. WOW![/quote]

You bet :wink:

0 Likes

#5

I’ve just came across this forum post

a .tmPreferences file (stored in your package/user folder) would do too!

0 Likes