Home Download Buy Blog Forum Support

Where do you define comment character for a language?

Where do you define comment character for a language?

Postby jakobud on Wed Jun 29, 2011 8:50 pm

In SublimeText when working with a YAML (*.yml) file, commenting a line uses the double frontslash (//) as the comment. This is not the correct syntax. The correct character is a # . See here http://www.yaml.org/spec/current.html#id2520528

I was looking through the Data/Packages trying to figure out where to change this but I couldn't find it. I figured it was in the yaml.tmLanguage but I couldn't track down the right place. Where do I change this?
jakobud
 
Posts: 37
Joined: Wed Feb 17, 2010 6:05 pm

Re: Where do you define comment character for a language?

Postby guillermooo on Wed Jun 29, 2011 9:33 pm

You use .tmPreferences files. This is the one for Lua:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>name</key>
   <string>Comments</string>
   <key>scope</key>
   <string>source.lua</string>
   <key>settings</key>
   <dict>
      <key>shellVariables</key>
      <array>
         <dict>
            <key>name</key>
            <string>TM_COMMENT_START</string>
            <key>value</key>
            <string>-- </string>
         </dict>
      </array>
   </dict>
   <key>uuid</key>
   <string>8A2A2BE0-B474-49B4-85C3-BAF2BD2FCAFB</string>
</dict>
</plist>

guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 36 guests