I’m looking to change editors from TextMate (Mac) and one of the problems, I’ve found is that .tmPreferences and symbols don’t work like in TextMate.
In TextMate the code below would result in “• TFoo” being added to the symbol list (Goto Symbol in Sublime) but in Sublime Text it’s capturing “• TFoo” (correctly) and also “• end;” for some reason. Another strange thing is even if I set “showInSymbolList” to 0, “Foo” is also added to the list (from procedure Foo;) and I have no idea where it’s getting that from.
Does anyone know why this may not be working in Sublime Text? The manual says it’s compatible so I don’t have any other ideas since this works in Text Mate. Thanks.
The example syntax:
type
TFoo = class (TObject)
procedure Foo;
end;
The .tmPreferences file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List: Class</string>
<key>scope</key>
<string>meta.class.definition.pascal</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>symbolTransformation</key>
<string>
s/=\s*(class|object|objcclass|objccategory|objcprotocol|interface)\s*(external)*\s*(?i:(name)*\s*)*('\w+')*\s*(\((.*)\))*//; # class names
s/^\s*//; # spaces from start of word
s/(\w+)/ • $1/; # class names
</string>
</dict>
<key>uuid</key>
<string>BBE77F44-D14D-4DE3-A0E0-40E994E8D572</string>
</dict>
</plist>