GoSublime icon indicating copy to clipboard operation
GoSublime copied to clipboard

SQL Syntax in strings

Open klaidliadon opened this issue 11 years ago • 0 comments

By adding this:

<dict>
    <key>begin</key>
    <string>``(?i)(?=\s*(?:SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)</string>
    <key>beginCaptures</key>
    <dict>
        <key>0</key>
        <dict>
            <key>name</key>
            <string>punctuation.definition.string.begin.go</string>
        </dict>
    </dict>
    <key>end</key>
    <string>``</string>
    <key>endCaptures</key>
    <dict>
        <key>0</key>
        <dict>
            <key>name</key>
            <string>punctuation.definition.string.end.go</string>
        </dict>
    </dict>
    <key>name</key>
    <string>string.quoted.raw.sql.go</string>
    <key>patterns</key>
    <array>
        <dict>
            <key>include</key>
            <string>source.sql</string>
        </dict>
    </array>
</dict> 

to the standard go syntax file before the normal multiline string, you can get sql syntax in strings. It will be nice have the same in GoSublime syntax

klaidliadon avatar May 27 '14 10:05 klaidliadon