Home Download Buy Blog Forum Support

SublimeModelines plugin

Re: SublimeModelines plugin

Postby guillermooo on Mon Jul 18, 2011 4:27 pm

I've checked and this works for *.dtml files:

Code: Select all
<!-- sublime: syntax 'Packages/CSS/CSS.tmLanguage -->


If you want to declare more modelines, you need to precede them with "<!-- sublime:", because "<!--" is the only TM_COMMENT_START variable defined for XML files. To make them valid XML, though, you'll need to include "-->" too.

The *.zcml will work as you describe because Sublime Text doesn't assign them any syntax (at least in my config), so SublimeModeliens defaults to the prefix "# sublime:". As it can be seen in your example, it's your modeline that's making the file XML, so before that it was unknown.

It seems I won't have to change the code after all... :)
guillermooo
 
Posts: 718
Joined: Thu Jul 23, 2009 9:06 am

Re: SublimeModelines plugin

Postby dsarch on Mon Jul 18, 2011 8:36 pm

Hmmmm,

Strange, i created a file called: "test.dtml" which have this code:

Code: Select all
<!-- sublime: syntax 'Packages/CSS/CSS.tmLanguage' -->

body {
    color:Black;
    font-family:"Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif;
    font-size:69%;
    font-size-adjust:none;
    font-style:normal;
    font-variant:normal;
    font-weight:normal;
    line-height:normal;
}


And it does not work for me. Does it work for you ?
dsarch
 
Posts: 62
Joined: Tue May 03, 2011 2:31 am

Re: SublimeModelines plugin

Postby guillermooo on Mon Jul 18, 2011 8:47 pm

Try this (note the additional linebreak):

Code: Select all
<!-- sublime: syntax 'Packages/CSS/CSS.tmLanguage'
-->

body {
    color:Black;
    font-family:"Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif;
    font-size:69%;
    font-size-adjust:none;
    font-style:normal;
    font-variant:normal;
    font-weight:normal;
    line-height:normal;
}


I might look into excluding the TM_END_COMMENT value from the key,value extraction for modelines.
guillermooo
 
Posts: 718
Joined: Thu Jul 23, 2009 9:06 am

Previous

Return to Plugin Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests

cron