Sublime Text 2, hidden jsp shortcut

In jsp files, whenever I click on a shortcut CTRL+/(in windows), the line is commented out with an โ€œoutput commentโ€, which means comments visible in the generated html:

<!-- Output comment -->

Instead, I want to bind this shortcut to the generation of "hidden comments", which are comments that will not appear in the results:

<%-- Hidden comment --%>

I tried to find where this shortcut is defined, but I had no luck.

+5
source share
1 answer

Click Preferences -> Browse Packages...to find configuration files.

The label is specified in HTML / Comments.tmPreferences. You can modify this file to change the comments of all jsp and html files .

jsp, JavaServerPagesComments.tmPreferences /Java :

<?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>text.html.jsp</string>
    <key>settings</key>
    <dict>
        <key>shellVariables</key>
        <array>
            <dict>
                <key>name</key>
                <string>TM_COMMENT_START</string>
                <key>value</key>
                <string>&lt;&#37;-- </string>
            </dict>
            <dict>
                <key>name</key>
                <string>TM_COMMENT_END</string>
                <key>value</key>
                <string> --&#37;&gt;</string>
            </dict>
        </array>
    </dict>
    <key>uuid</key>
    <string>54444C7B-54D2-41F6-A817-AEE243C3D45A</string>
</dict>
</plist>
+7

All Articles