Removed sublimetext from dotfiles, added some other updates
2
.gitconfig
Normal file → Executable file
@ -11,3 +11,5 @@
|
||||
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
|
||||
type = cat-file -t
|
||||
dump = cat-file -p
|
||||
[push]
|
||||
default = simple
|
||||
|
0
.gitignore
vendored
Normal file → Executable file
0
.tmux.conf
Normal file → Executable file
0
.vim/colors/solarized.vim
Normal file → Executable file
18
install.sh
@ -28,6 +28,8 @@ case "$choice" in
|
||||
rm -rf .vim;
|
||||
fi
|
||||
ln -s $DIR/.vim .vim;
|
||||
mkdir ~/.vim/swaps
|
||||
mkdir ~/.vim/backups
|
||||
|
||||
echo "Linking Git...";
|
||||
if [ -f .gitconfig ];
|
||||
@ -43,22 +45,6 @@ case "$choice" in
|
||||
fi
|
||||
ln -s $DIR/.tmux.conf .tmux.conf;
|
||||
|
||||
echo "Linking Sublime Text 2..."
|
||||
# Location of sublime settings on this computer
|
||||
if [ `uname` = "Darwin" ];then
|
||||
SUBLIME_FOLDER="$HOME/Library/Application Support/Sublime Text 2"
|
||||
elif [ `uname` = "Linux" ];then
|
||||
SUBLIME_FOLDER="$HOME/.config/sublime-text-2"
|
||||
else
|
||||
echo "Unknown operating system"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -r "$SUBLIME_FOLDER/Packages"
|
||||
|
||||
echo "Creating symbolic links to dropbox folders"
|
||||
ln -s "$DIR/sublimetext2/Packages" "$SUBLIME_FOLDER/Packages"
|
||||
|
||||
echo "Hotswapping bash...";
|
||||
source .zshrc;
|
||||
|
||||
|
@ -1,214 +0,0 @@
|
||||
<?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>comment</key>
|
||||
<string>ASP SCRIPTING DICTIONARY – By Rich Barton: Version 1.0 (based on PHP Scripting Dictionary by Justin French, Sune Foldager and Allan Odgaard) Note: .asp is handled by asp/html</string>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>asa</string>
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>(?i)^\s*(Public|Private)?\s*(Class|Function|Sub|Property)\s*([a-zA-Z_]\w*)\s*(\(.*\)\s*)?$</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>(?i)^\s*End (Class|Function|Sub|Property)\s*$</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~A</string>
|
||||
<key>name</key>
|
||||
<string>ASP</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.function.asp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.asp</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.asp</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.function.asp</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^\s*((?i:function|sub))\s*([a-zA-Z_]\w*)\s*(\()([^)]*)(\)).*\n?</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(').*$\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.apostrophe.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(REM ).*$\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.rem.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(If|Then|Else|ElseIf|End If|While|Wend|For|To|Each|In|Step|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub)\b)</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>=|>=|<|>|<|<>|\+|-|\*|\^|&|\b(?i:(Mod|And|Not|Or|Xor|Is))\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Call|Class|Const|Dim|Redim|Function|Sub|Property|End Property|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo)\b)</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Private|Public|Default)\b)</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Empty|False|Nothing|Null|True)\b)</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"(?!")</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.asp</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>""</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.apostrophe.asp</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.variable.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.other.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Application|ObjectContext|Request|Response|Server|Session)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.class.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.class.collection.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Lock|Unlock|SetAbort|SetComplete|BianryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.function.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart|Class_Initialize|Class_Terminate)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.function.event.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.function.vb.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\b(vbtrue|fvbalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\b)</string>
|
||||
<key>name</key>
|
||||
<string>support.type.vb.asp</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.asp</string>
|
||||
<key>uuid</key>
|
||||
<string>291022B4-6B1D-11D9-90EB-000D93589AF6</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,74 +0,0 @@
|
||||
<?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>fileTypes</key>
|
||||
<array>
|
||||
<string>asp</string>
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>(<(?i:(head|table|div|style|script|ul|ol|form|dl))\b.*?>|\{)</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>(</(?i:(head|table|div|style|script|ul|ol|form|dl))>|\})</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~A</string>
|
||||
<key>name</key>
|
||||
<string>HTML (ASP)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string><%=?</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.section.embedded.begin.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>%></string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.section.embedded.end.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>source.asp.embedded.html</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.asp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(').*?(?=%>)</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.apostrophe.asp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>source.asp</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>text.html.basic</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>text.html.asp</string>
|
||||
<key>uuid</key>
|
||||
<string>27798CC6-6B1D-11D9-B8FA-000D93589AF6</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,111 +0,0 @@
|
||||
<?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>uuid</key>
|
||||
<string>E07EC438-7B75-4437-8AA1-DA94C1E6EACC</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.command.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>\b(?i)(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|rem|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\b</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.statement.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>\b(?i)(?:goto|call|exit)\b</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.conditional.if.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>\b(?i)if\s+((not)\s+)(exist|defined|errorlevel|cmdextversion)\b</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.conditional.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>\b(?i)(?:if|else)\b</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.repeat.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>\b(?i)for\b</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\b</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.command.rem.dosbatch</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>comment.line.rem.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>(?:^|\s)((?i)rem)(?:$|\s.*$)</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>comment.line.colons.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>\s*:\s*:.*$</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.shell</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.shell</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.dosbatch</string>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.pipe.dosbatch</string>
|
||||
<key>match</key>
|
||||
<string>[|]</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.redirect.shell</string>
|
||||
<key>match</key>
|
||||
<string>&>|\d*>&\d*|\d*(>>|>|<)|\d*<&|\d*<></string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>name</key>
|
||||
<string>Batch File</string>
|
||||
<key>scopeName</key>
|
||||
<string>source.dosbatch</string>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>bat</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
@ -1,3 +0,0 @@
|
||||
*.pyc
|
||||
|
||||
.DS_Store
|
@ -1,104 +0,0 @@
|
||||
{
|
||||
//Enable bracket matching on type
|
||||
"quote_enable" : true,
|
||||
"curly_enable" : true,
|
||||
"round_enable" : true,
|
||||
"square_enable": true,
|
||||
"angle_enable" : true,
|
||||
|
||||
// Higlight tags if tag is selected. angle_enable must be true for tags to work
|
||||
// if you would like to ignore non tags then set ignore_non_tags to true
|
||||
"tag_enable" : true,
|
||||
|
||||
// don't show non tag angle matches
|
||||
"ignore_non_tags" : false,
|
||||
|
||||
// match brackets only when the cursor is adjacent to one
|
||||
"match_adjacent_only" : false,
|
||||
|
||||
// exclude or include bracket by language type (example: C++ for C++.tmLanguage)
|
||||
// Note: this is particularly useful with Angle. Some languages do not attribute any special scope to angle brackets making it hard
|
||||
// to tell when the bracket is beign used in a valid scenario. C++ is a perfect example. It is better to disable completely than
|
||||
// to ignore angle. Ignoring will not show angle matches, but will also interfere with other bracket matches.
|
||||
"angle_language_list" : ["HTML","HTML 5","XML","PHP"],
|
||||
"tag_language_list" : ["HTML","HTML 5","XML","PHP"],
|
||||
"quote_language_list" : ["Plain text"],
|
||||
"curly_language_list" : ["Plain text"],
|
||||
"round_language_list" : ["Plain text"],
|
||||
"square_language_list": ["Plain text"],
|
||||
|
||||
//filter type (whitelist|blacklist)
|
||||
"angle_language_filter" : "whitelist",
|
||||
"tag_language_filter" : "whitelist",
|
||||
"quote_language_filter" : "blacklist",
|
||||
"curly_language_filter" : "blacklist",
|
||||
"round_language_filter" : "blacklist",
|
||||
"square_language_filter": "blacklist",
|
||||
|
||||
// Scope? (Defined in theme files.)
|
||||
// Examples: (keyword|string|number)
|
||||
"quote_scope" : "entity.name.class",
|
||||
"curly_scope" : "entity.name.class",
|
||||
"round_scope" : "entity.name.class",
|
||||
"square_scope": "entity.name.class",
|
||||
"angle_scope" : "entity.name.class",
|
||||
"tag_scope" : "entity.name.class",
|
||||
|
||||
// Outline? (solid|outline|underline|none)
|
||||
"quote_style" : "solid",
|
||||
"curly_style" : "solid",
|
||||
"round_style" : "solid",
|
||||
"square_style": "solid",
|
||||
"angle_style" : "solid",
|
||||
"tag_style" : "outline",
|
||||
|
||||
// Path to gutter icons (relative to Packages)
|
||||
"icon_path" : "BracketHighlighter/icons",
|
||||
|
||||
// Disable gutter icons when doing multi-select
|
||||
"no_multi_select_icons": false,
|
||||
|
||||
// Icon? (dot|circle|bookmark|quote|curly_bracket|round_bracket|square_bracket|angle_bracket|none)
|
||||
"quote_icon" : "quote",
|
||||
"curly_icon" : "curly_bracket",
|
||||
"round_icon" : "round_bracket",
|
||||
"square_icon": "square_bracket",
|
||||
"angle_icon" : "angle_bracket",
|
||||
"tag_icon" : "angle_bracket",
|
||||
|
||||
// Higlight brackets of tag only instead of entire tag
|
||||
"tag_brackets_only" : false,
|
||||
|
||||
// Detect self closing tags (experimental)
|
||||
"detect_self_closing_tags": true,
|
||||
|
||||
// Type of tag selection? (html|xhtml|cfml) (experimental:cfml)
|
||||
"tag_type" : "html",
|
||||
|
||||
// Threshold distance to search
|
||||
"search_threshold" : 2000,
|
||||
"tag_search_threshold" : 2000,
|
||||
"use_search_threshold" : true,
|
||||
"tag_use_search_threshold" : true,
|
||||
|
||||
// Selection threshold; max multi-selection allowed for auto-highlight
|
||||
"auto_selection_threshold" : 10,
|
||||
|
||||
// When matching quoted strings, match brackets internally in the string as well.
|
||||
// Particularly useful for strings containing regex
|
||||
"match_string_brackets": true,
|
||||
|
||||
// Find brackets in non-quoted scoped strings
|
||||
"find_brackets_in_any_string": true,
|
||||
|
||||
// Ignore highlighting strings but highlight brackets that are found inside.
|
||||
"highlight_string_brackets_only": false,
|
||||
|
||||
// Match brackets only when cursor is between the brackets
|
||||
"match_brackets_only_when_between": false,
|
||||
|
||||
// Default string escape mode for string brackets (string|regex)
|
||||
// string escape: \\{
|
||||
// regex escape: \{
|
||||
"default_bracket_string_escape_mode": "regex"
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
[
|
||||
{
|
||||
"keys": ["ctrl+shift+b", "ctrl+shift+b"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args": {"lines": true}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+up"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "left"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+down"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "right"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+s"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+t"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"ignore": ["quote"],
|
||||
"plugin":
|
||||
{
|
||||
"type": ["tag"],
|
||||
"command": "bracket_plugins.select_tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+n"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"ignore": ["quote"],
|
||||
"plugin":
|
||||
{
|
||||
"type": ["tag"],
|
||||
"command": "bracket_plugins.select_attr",
|
||||
"args": {"direction": "right"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+q"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin": {"type": ["quote"],"command" : "bracket_plugins.swap_quotes"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+j"],
|
||||
"command": "swap_brackets"
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+["],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin": {"type": ["quote", "tag", "bracket"],"command" : "bracket_plugins.fold_bracket"}
|
||||
}
|
||||
}
|
||||
]
|
@ -1,95 +0,0 @@
|
||||
[
|
||||
{
|
||||
"keys": ["super+shift+b", "super+shift+b"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args": {"lines": true}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+up"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "left"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+down"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "right"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+shift+b","super+shift+s"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+shift+b","super+shift+t"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"ignore": ["quote"],
|
||||
"plugin":
|
||||
{
|
||||
"type": ["tag"],
|
||||
"command": "bracket_plugins.select_tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+shift+b","super+shift+n"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"ignore": ["quote"],
|
||||
"plugin":
|
||||
{
|
||||
"type": ["tag"],
|
||||
"command": "bracket_plugins.select_attr",
|
||||
"args": {"direction": "right"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+shift+b","super+shift+w"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin": {"type": ["quote"],"command" : "bracket_plugins.swap_quotes"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["super+shift+b","super+shift+j"],
|
||||
"command": "swap_brackets"
|
||||
},
|
||||
{
|
||||
"keys": ["super+shift+b","super+shift+["],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin": {"type": ["quote", "tag", "bracket"],"command" : "bracket_plugins.fold_bracket"}
|
||||
}
|
||||
}
|
||||
]
|
@ -1,95 +0,0 @@
|
||||
[
|
||||
{
|
||||
"keys": ["ctrl+shift+b", "ctrl+shift+b"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args": {"lines": true}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+up"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "left"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["alt+down"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "right"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+s"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+t"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"ignore": ["quote"],
|
||||
"plugin":
|
||||
{
|
||||
"type": ["tag"],
|
||||
"command": "bracket_plugins.select_tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+n"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"ignore": ["quote"],
|
||||
"plugin":
|
||||
{
|
||||
"type": ["tag"],
|
||||
"command": "bracket_plugins.select_attr",
|
||||
"args": {"direction": "right"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+q"],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin": {"type": ["quote"],"command" : "bracket_plugins.swap_quotes"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+j"],
|
||||
"command": "swap_brackets"
|
||||
},
|
||||
{
|
||||
"keys": ["ctrl+shift+b","ctrl+shift+["],
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin": {"type": ["quote", "tag", "bracket"],"command" : "bracket_plugins.fold_bracket"}
|
||||
}
|
||||
}
|
||||
]
|
@ -1,93 +0,0 @@
|
||||
[
|
||||
{
|
||||
"caption": "Bracket Highlighter: Toggle Bracket String Escape Mode",
|
||||
"command": "toggle_bracket_string_escape_mode"
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Show Bracket String Escape Mode",
|
||||
"command": "show_bracket_string_escape_mode"
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Match Brackets",
|
||||
"command": "bracket_highlighter_key",
|
||||
"args": {"lines": true}
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Show Left Bracket",
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "left"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Show Right Bracket",
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket",
|
||||
"args": {"select": "right"}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Select Bracket Content",
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"lines" : true,
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote","bracket","tag"],
|
||||
"command": "bracket_plugins.select_bracket"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Select Tag",
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"ignore": ["quote"],
|
||||
"plugin":
|
||||
{
|
||||
"type": ["tag"],
|
||||
"command": "bracket_plugins.select_tag"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Swap Quotes",
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin":
|
||||
{
|
||||
"type": ["quote"],
|
||||
"command": "bracket_plugins.swap_quotes"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Swap Brackets",
|
||||
"command": "swap_brackets"
|
||||
},
|
||||
{
|
||||
"caption": "Bracket Highlighter: Fold by Brackets",
|
||||
"command": "bracket_highlighter_key",
|
||||
"args":
|
||||
{
|
||||
"plugin": {"type": ["quote", "tag", "bracket"],"command" : "bracket_plugins.fold_bracket"}
|
||||
}
|
||||
}
|
||||
]
|
@ -1,387 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
'''
|
||||
Context-independent xHTML pair matcher
|
||||
Use method <code>match(html, start_ix)</code> to find matching pair.
|
||||
If pair was found, this function returns a list of indexes where tag pair
|
||||
starts and ends. If pair wasn't found, <code>None</code> will be returned.
|
||||
|
||||
The last matched (or unmatched) result is saved in <code>last_match</code>
|
||||
dictionary for later use.
|
||||
|
||||
@author: Sergey Chikuyonok (serge.che@gmail.com)
|
||||
'''
|
||||
import re
|
||||
|
||||
html_start_tag = [r'<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>\s]+))?)*)\s*(\/?)>']
|
||||
cf_start_tag = [
|
||||
r'<([\w\:\-]+)((?:\s+[\w\-\.:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>\s]+))?)*)\s*(\/?)>',
|
||||
r'(?i)<(cfif|cfelseif)((?:[^>]+))\s*(\/?)>'
|
||||
]
|
||||
start_tag = html_start_tag
|
||||
end_tag = r'<\/([\w\:\-]+)[^>]*>'
|
||||
attr = r'([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?'
|
||||
|
||||
"Last matched HTML pair"
|
||||
last_match = {
|
||||
'opening_tag': None, # Tag() or Comment() object
|
||||
'closing_tag': None, # Tag() or Comment() object
|
||||
'start_ix': -1,
|
||||
'end_ix': -1
|
||||
}
|
||||
|
||||
"Current matching mode"
|
||||
cur_mode = 'xhtml'
|
||||
detect_self_closing = False
|
||||
|
||||
|
||||
def set_mode(new_mode, find_self_closing=False):
|
||||
global cur_mode
|
||||
global start_tag
|
||||
global detect_self_closing
|
||||
detect_self_closing = bool(find_self_closing)
|
||||
start_tag = cf_start_tag if new_mode == 'cfml' else html_start_tag
|
||||
if new_mode not in ['html', 'cfml']:
|
||||
new_mode = 'xhtml'
|
||||
cur_mode = new_mode
|
||||
|
||||
|
||||
def make_map(elems):
|
||||
"""
|
||||
Create dictionary of elements for faster searching
|
||||
@param elems: Elements, separated by comma
|
||||
@type elems: str
|
||||
"""
|
||||
obj = {}
|
||||
for elem in elems.split(','):
|
||||
obj[elem] = True
|
||||
|
||||
return obj
|
||||
|
||||
|
||||
# Empty Elements - HTML 4.01
|
||||
empty = make_map("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed")
|
||||
|
||||
# Block Elements - HTML 4.01
|
||||
block = make_map("address,applet,blockquote,button,center,dd,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul")
|
||||
|
||||
# Inline Elements - HTML 4.01
|
||||
inline = make_map("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var")
|
||||
|
||||
# Elements that you can, intentionally, leave open
|
||||
# (and which close themselves)
|
||||
close_self = make_map("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr")
|
||||
|
||||
# Attributes that have their values filled in disabled="disabled"
|
||||
fill_attrs = make_map("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected")
|
||||
|
||||
#Special Elements (can contain anything)
|
||||
# serge.che: parsing data inside <scipt> elements is a "feature"
|
||||
special = make_map("style")
|
||||
|
||||
|
||||
class Tag():
|
||||
"""Matched tag"""
|
||||
def __init__(self, match, ix):
|
||||
"""
|
||||
@type match: MatchObject
|
||||
@param match: Matched HTML tag
|
||||
@type ix: int
|
||||
@param ix: Tag's position
|
||||
"""
|
||||
global cur_mode
|
||||
|
||||
name = match.group(1).lower()
|
||||
self.name = name
|
||||
self.full_tag = match.group(0)
|
||||
self.start = ix
|
||||
self.end = ix + len(self.full_tag)
|
||||
|
||||
self.unary = (
|
||||
(len(match.groups()) > 2 and bool(match.group(3))) or
|
||||
(name in empty and (cur_mode in ['html', 'cfml']))
|
||||
)
|
||||
self.type = 'tag'
|
||||
self.close_self = (
|
||||
(
|
||||
(name in close_self and cur_mode == 'html') or
|
||||
(name.lower().startswith("cf") and cur_mode == 'cfml')
|
||||
) and
|
||||
detect_self_closing
|
||||
)
|
||||
|
||||
|
||||
class Comment():
|
||||
"Matched comment"
|
||||
def __init__(self, start, end):
|
||||
self.start = start
|
||||
self.end = end
|
||||
self.type = 'comment'
|
||||
|
||||
|
||||
def make_range(opening_tag=None, closing_tag=None, ix=0):
|
||||
"""
|
||||
Makes selection ranges for matched tag pair
|
||||
@type opening_tag: Tag
|
||||
@type closing_tag: Tag
|
||||
@type ix: int
|
||||
@return list
|
||||
"""
|
||||
start_ix, end_ix = -1, -1
|
||||
|
||||
if opening_tag and not closing_tag: # unary element
|
||||
start_ix = opening_tag.start
|
||||
end_ix = opening_tag.end
|
||||
elif opening_tag and closing_tag: # complete element
|
||||
if (
|
||||
(opening_tag.start < ix and opening_tag.end > ix) or
|
||||
(closing_tag.start <= ix and closing_tag.end > ix)
|
||||
):
|
||||
start_ix = opening_tag.start
|
||||
end_ix = closing_tag.end
|
||||
else:
|
||||
start_ix = opening_tag.end
|
||||
end_ix = closing_tag.start
|
||||
return start_ix, end_ix
|
||||
|
||||
|
||||
def save_match(opening_tag=None, closing_tag=None, ix=0):
|
||||
"""
|
||||
Save matched tag for later use and return found indexes
|
||||
@type opening_tag: Tag
|
||||
@type closing_tag: Tag
|
||||
@type ix: int
|
||||
@return list
|
||||
"""
|
||||
last_match['opening_tag'] = opening_tag
|
||||
last_match['closing_tag'] = closing_tag
|
||||
|
||||
(last_match['start_ix'], last_match['end_ix']) = make_range(opening_tag, closing_tag, ix)
|
||||
|
||||
return (
|
||||
last_match['start_ix'] != -1 and
|
||||
(last_match['start_ix'], last_match['end_ix']) or
|
||||
(None, None)
|
||||
)
|
||||
|
||||
|
||||
def match(html, start_ix, mode='xhtml', find_self_closing=False, use_threshold=True, search_thresh=2000):
|
||||
"""
|
||||
Search for matching tags in <code>html</code>, starting from
|
||||
<code>start_ix</code> position. The result is automatically saved
|
||||
in <code>last_match</code> property
|
||||
"""
|
||||
return _find_pair(html, start_ix, find_self_closing, use_threshold, search_thresh, mode, save_match)
|
||||
|
||||
|
||||
def find(html, start_ix, mode='xhtml', find_self_closing=False, use_threshold=True, search_thresh=2000):
|
||||
"""
|
||||
Search for matching tags in <code>html</code>, starting from
|
||||
<code>start_ix</code> position.
|
||||
"""
|
||||
return _find_pair(html, start_ix, find_self_closing, use_threshold, search_thresh, mode)
|
||||
|
||||
|
||||
def get_tags(html, start_ix, mode='xhtml', find_self_closing=False, use_threshold=True, search_thresh=2000):
|
||||
"""
|
||||
Search for matching tags in <code>html</code>, starting from
|
||||
<code>start_ix</code> position. The difference between
|
||||
<code>match</code> function itself is that <code>get_tags</code>
|
||||
method doesn't save matched result in <code>last_match</code> property
|
||||
and returns array of opening and closing tags
|
||||
This method is generally used for lookups
|
||||
"""
|
||||
return _find_pair(
|
||||
html,
|
||||
start_ix,
|
||||
find_self_closing,
|
||||
use_threshold,
|
||||
search_thresh, mode,
|
||||
lambda op, cl=None, ix=0: (op, cl) if op and op.type == 'tag' else None
|
||||
)
|
||||
|
||||
|
||||
def is_tag(substr, cf_enable=False):
|
||||
found_tag = False
|
||||
patterns = cf_start_tag if cf_enable else html_start_tag
|
||||
for pattern in patterns:
|
||||
found_tag |= bool(re.match(pattern, substr) or re.match(end_tag, substr))
|
||||
return found_tag
|
||||
|
||||
|
||||
def _find_pair(html, start_ix, find_self_closing, use_threshold, search_threshold, mode='xhtml', action=make_range):
|
||||
"""
|
||||
Search for matching tags in <code>html</code>, starting from
|
||||
<code>start_ix</code> position
|
||||
|
||||
@param html: Code to search
|
||||
@type html: str
|
||||
|
||||
@param start_ix: Character index where to start searching pair
|
||||
(commonly, current caret position)
|
||||
@type start_ix: int
|
||||
|
||||
@param action: Function that creates selection range
|
||||
@type action: function
|
||||
|
||||
@return: list
|
||||
"""
|
||||
|
||||
forward_stack = []
|
||||
backward_stack = []
|
||||
opening_name = None
|
||||
closing_name = None
|
||||
opening_tag = None
|
||||
closing_tag = None
|
||||
html_len = len(html)
|
||||
|
||||
set_mode(mode, find_self_closing)
|
||||
|
||||
def has_match(substr, start=None):
|
||||
if start is None:
|
||||
start = ix
|
||||
|
||||
return html.find(substr, start) == start
|
||||
|
||||
def find_comment_start(start_pos):
|
||||
while start_pos:
|
||||
if html[start_pos] == '<' and has_match('<!--', start_pos):
|
||||
break
|
||||
|
||||
start_pos -= 1
|
||||
|
||||
return start_pos
|
||||
|
||||
# find opening tag
|
||||
ix = start_ix - 1
|
||||
while ix >= 0:
|
||||
if (use_threshold == True):
|
||||
search_threshold -= 1
|
||||
if(search_threshold < 0):
|
||||
return action(None)
|
||||
ch = html[ix]
|
||||
if ch == '<':
|
||||
check_str = html[ix:]
|
||||
m = re.match(end_tag, check_str)
|
||||
if m: # found closing tag
|
||||
tmp_tag = Tag(m, ix)
|
||||
if ( # direct hit on searched closing tag
|
||||
tmp_tag.start < start_ix and
|
||||
tmp_tag.end > start_ix
|
||||
):
|
||||
closing_tag = tmp_tag
|
||||
closing_name = tmp_tag.name
|
||||
else:
|
||||
backward_stack.append(tmp_tag)
|
||||
else:
|
||||
for pattern in start_tag:
|
||||
m = re.match(pattern, check_str)
|
||||
if m:
|
||||
break
|
||||
if m: # found opening tag
|
||||
tmp_tag = Tag(m, ix)
|
||||
if tmp_tag.unary:
|
||||
if ( # exact match
|
||||
tmp_tag.start < start_ix and
|
||||
tmp_tag.end > start_ix
|
||||
):
|
||||
return action(tmp_tag, None, start_ix)
|
||||
elif ( # Match sub tag
|
||||
backward_stack and
|
||||
backward_stack[-1].name == tmp_tag.name
|
||||
):
|
||||
backward_stack.pop()
|
||||
elif ( # Pass over self-closing tag
|
||||
tmp_tag.close_self and
|
||||
closing_tag and
|
||||
closing_name != tmp_tag.name
|
||||
):
|
||||
pass
|
||||
elif len(backward_stack) == 0: # found nearest unclosed tag
|
||||
opening_tag = tmp_tag
|
||||
opening_name = tmp_tag.name
|
||||
break
|
||||
elif check_str.startswith('<!--'): # found comment start
|
||||
end_ix = check_str.find('-->') + ix + 3
|
||||
if ix < start_ix and end_ix >= start_ix:
|
||||
return action(Comment(ix, end_ix))
|
||||
elif ch == '-' and has_match('-->'): # found comment end
|
||||
# search left until comment start is reached
|
||||
ix = find_comment_start(ix)
|
||||
|
||||
ix -= 1
|
||||
|
||||
if not opening_tag:
|
||||
return action(None)
|
||||
|
||||
# find closing tag
|
||||
if not closing_tag:
|
||||
ix = start_ix
|
||||
while ix < html_len:
|
||||
if (use_threshold == True):
|
||||
search_threshold -= 1
|
||||
if(search_threshold < 0):
|
||||
if opening_tag.close_self:
|
||||
return action(opening_tag, None, start_ix)
|
||||
else:
|
||||
return action(None)
|
||||
ch = html[ix]
|
||||
if ch == '<':
|
||||
check_str = html[ix:]
|
||||
for pattern in start_tag:
|
||||
m = re.match(pattern, check_str)
|
||||
if m:
|
||||
break
|
||||
if m: # found opening tag
|
||||
tmp_tag = Tag(m, ix)
|
||||
if not tmp_tag.unary:
|
||||
forward_stack.append(tmp_tag)
|
||||
else:
|
||||
m = re.match(end_tag, check_str)
|
||||
if m: # found closing tag
|
||||
tmp_tag = Tag(m, ix)
|
||||
# Navigate stack to match the sub tag
|
||||
# and/or remove sub tags that are optionally self-closing.
|
||||
if forward_stack:
|
||||
if forward_stack[-1].name == tmp_tag.name:
|
||||
# Normal tag match
|
||||
forward_stack.pop()
|
||||
else:
|
||||
# Stack probably has self closing tags in on top
|
||||
# Pop off tags that are self-closing (assume they weren't matched)
|
||||
found_in_stack = False
|
||||
while forward_stack and forward_stack[-1].close_self:
|
||||
forward_stack.pop()
|
||||
# Check if the the next element matches the sub tag
|
||||
if forward_stack and forward_stack[-1].name == tmp_tag.name:
|
||||
# Found match, no need to look further in the stack
|
||||
forward_stack.pop()
|
||||
found_in_stack = True
|
||||
break
|
||||
# If no match was found, and the stack is empty,
|
||||
# it can be assumed that this tag is the main match
|
||||
if not found_in_stack and len(forward_stack) == 0:
|
||||
closing_tag = tmp_tag
|
||||
closing_name = tmp_tag.name
|
||||
break
|
||||
elif len(forward_stack) == 0: # found matched closing tag
|
||||
closing_tag = tmp_tag
|
||||
closing_name = tmp_tag.name
|
||||
break
|
||||
elif has_match('<!--'): # found comment
|
||||
ix += check_str.find('-->') + 2
|
||||
continue
|
||||
elif ch == '-' and has_match('-->'):
|
||||
# looks like cursor was inside comment with invalid HTML
|
||||
if not forward_stack or forward_stack[-1].type != 'comment':
|
||||
end_ix = ix + 3
|
||||
return action(Comment(find_comment_start(ix), end_ix))
|
||||
|
||||
ix += 1
|
||||
if(opening_name != closing_name):
|
||||
if opening_tag.close_self:
|
||||
return action(opening_tag, None, start_ix)
|
||||
else:
|
||||
return action(None)
|
||||
return action(opening_tag, closing_tag, start_ix)
|
@ -1,83 +0,0 @@
|
||||
[
|
||||
{
|
||||
"caption": "Preferences",
|
||||
"mnemonic": "n",
|
||||
"id": "preferences",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"caption": "Package Settings",
|
||||
"mnemonic": "P",
|
||||
"id": "package-settings",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"caption": "Bracket Highlighter",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {"file": "${packages}/BracketHighlighter/BracketHighlighter.sublime-settings"},
|
||||
"caption": "Settings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {"file": "${packages}/User/BracketHighlighter.sublime-settings"},
|
||||
"caption": "Settings – User"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/BracketHighlighter/Default (Windows).sublime-keymap",
|
||||
"platform": "Windows"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/BracketHighlighter/Default (OSX).sublime-keymap",
|
||||
"platform": "OSX"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/BracketHighlighter/Default (Linux).sublime-keymap",
|
||||
"platform": "Linux"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/User/Default (Windows).sublime-keymap",
|
||||
"platform": "Windows"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/User/Default (OSX).sublime-keymap",
|
||||
"platform": "OSX"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/User/Default (Linux).sublime-keymap",
|
||||
"platform": "Linux"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{ "caption": "-" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -1,69 +0,0 @@
|
||||
import sublime
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Pull in built-in plugin directory
|
||||
built_in_plugins = os.path.join(sublime.packages_path(), 'BracketHighlighter')
|
||||
if not built_in_plugins in sys.path:
|
||||
sys.path.append(built_in_plugins)
|
||||
|
||||
|
||||
class BracketPlugin(object):
|
||||
def __init__(self, plugin):
|
||||
self.enabled = False
|
||||
self.args = plugin['args'] if ("args" in plugin) else {}
|
||||
self.plugin = None
|
||||
if 'command' in plugin:
|
||||
try:
|
||||
(module_name, class_name) = plugin['command'].split('.')
|
||||
module = __import__(module_name)
|
||||
self.plugin = getattr(module, class_name)
|
||||
self.enabled = True
|
||||
except Exception:
|
||||
sublime.error_message('Can not load plugin: ' + plugin['command'])
|
||||
|
||||
def is_enabled(self):
|
||||
return self.enabled
|
||||
|
||||
def run_command(self, bracket, content, selection, bracket_type):
|
||||
self.args['bracket'] = bracket
|
||||
self.args['content'] = content
|
||||
self.args['selection'] = selection
|
||||
plugin = self.plugin(bracket, content, selection, bracket_type)
|
||||
plugin.run(**self.args)
|
||||
return plugin.attr.get_attr()
|
||||
|
||||
|
||||
class BracketAttributes(object):
|
||||
def __init__(self, bracket, content, selection, bracket_type):
|
||||
self.bracket = bracket
|
||||
self.content = content
|
||||
self.selection = selection
|
||||
self.bracket_type = bracket_type
|
||||
|
||||
def set_bracket(self, bracket):
|
||||
self.bracket = bracket
|
||||
|
||||
def set_content(self, content):
|
||||
self.content = content
|
||||
|
||||
def set_selection(self, selection):
|
||||
self.selection = selection
|
||||
|
||||
def get_type(self):
|
||||
return self.bracket_type
|
||||
|
||||
def get_attr(self):
|
||||
return (self.bracket, self.content, self.selection)
|
||||
|
||||
|
||||
class BracketPluginCommand(object):
|
||||
def __init__(self, bracket, content, selection, bracket_type):
|
||||
self.view = sublime.active_window().active_view()
|
||||
self.attr = BracketAttributes(bracket, content, selection, bracket_type)
|
||||
|
||||
def run(self, bracket, content, selection):
|
||||
pass
|
||||
|
||||
# Register sublime commands from built-in plugins
|
||||
from bracket_plugins.sublime_commands import *
|
@ -1,6 +0,0 @@
|
||||
from swapbrackets import swap_brackets_transform
|
||||
from swapquotes import swap_quotes
|
||||
from tagattrselect import select_attr
|
||||
from tagnameselect import select_tag
|
||||
from bracketselect import select_bracket
|
||||
from foldbracket import fold_bracket
|
@ -1,23 +0,0 @@
|
||||
import bracket_plugin
|
||||
import sublime
|
||||
|
||||
|
||||
class select_bracket(bracket_plugin.BracketPluginCommand):
|
||||
def run(self, bracket, content, selection, select=''):
|
||||
(first, last) = (content.a, content.b)
|
||||
bh_type = self.attr.get_type()
|
||||
if select == 'left':
|
||||
if bh_type == "tag":
|
||||
first, last = (bracket.begin() + 1, bracket.begin() + 1)
|
||||
else:
|
||||
last = content.a
|
||||
elif select == 'right':
|
||||
if bh_type == "tag":
|
||||
if content.end() < bracket.end():
|
||||
first, last = (content.end() + 1, content.end() + 1)
|
||||
else:
|
||||
# There is no second tag, so just select the first
|
||||
first, last = (bracket.begin() + 1, bracket.begin() + 1)
|
||||
else:
|
||||
first = content.b
|
||||
self.attr.set_selection([sublime.Region(first, last)])
|
@ -1,10 +0,0 @@
|
||||
import bracket_plugin
|
||||
|
||||
|
||||
class fold_bracket(bracket_plugin.BracketPluginCommand):
|
||||
def run(self, bracket, content, selection):
|
||||
new_content = [content]
|
||||
if content.size > 0:
|
||||
if self.view.fold(content) == False:
|
||||
new_content = self.view.unfold(content)
|
||||
self.attr.set_selection(new_content)
|
@ -1 +0,0 @@
|
||||
from swapbrackets import SwapBracketsCommand
|
@ -1,45 +0,0 @@
|
||||
import bracket_plugin
|
||||
import sublime
|
||||
import sublime_plugin
|
||||
|
||||
|
||||
class swap_brackets_transform(bracket_plugin.BracketPluginCommand):
|
||||
def run(self, bracket, content, selection, bracket_type="square"):
|
||||
brackets = {
|
||||
"square": ["[", "]"],
|
||||
"round": ["(", ")"],
|
||||
"angle": ["<", ">"],
|
||||
"curly": ["{", "}"]
|
||||
}
|
||||
edit = self.view.begin_edit()
|
||||
self.view.replace(edit, sublime.Region(bracket.begin(), bracket.begin() + 1), brackets[bracket_type][0])
|
||||
self.view.replace(edit, sublime.Region(bracket.end() - 1, bracket.end()), brackets[bracket_type][1])
|
||||
self.view.end_edit(edit)
|
||||
|
||||
|
||||
class SwapBracketsCommand(sublime_plugin.WindowCommand):
|
||||
def swap_brackets(self, value):
|
||||
brackets = [
|
||||
"square",
|
||||
"round",
|
||||
"angle",
|
||||
"curly"
|
||||
]
|
||||
self.window.run_command(
|
||||
"bracket_highlighter_key", {
|
||||
"plugin": {
|
||||
"type": ["bracket"],
|
||||
"command": "bracket_plugins.swap_brackets_transform",
|
||||
"args": {"bracket_type": brackets[value]}
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
def run(self):
|
||||
self.window.show_quick_panel(
|
||||
[
|
||||
"[] square", "() round",
|
||||
"<> angle", "{} curly"
|
||||
],
|
||||
self.swap_brackets
|
||||
)
|
@ -1,41 +0,0 @@
|
||||
import bracket_plugin
|
||||
import sublime
|
||||
|
||||
|
||||
class swap_quotes(bracket_plugin.BracketPluginCommand):
|
||||
def escaped(self, idx):
|
||||
view = self.view
|
||||
escaped = False
|
||||
while idx >= 0 and view.substr(idx) == '\\':
|
||||
escaped = ~escaped
|
||||
idx -= 1
|
||||
return escaped
|
||||
|
||||
def run(self, bracket, content, selection):
|
||||
view = self.view
|
||||
quote = view.substr(bracket.a)
|
||||
if quote != "'" and quote != '"':
|
||||
return
|
||||
new = "'" if (quote == '"') else '"'
|
||||
old = quote
|
||||
begin = bracket.a + 1
|
||||
end = bracket.b
|
||||
edit = view.begin_edit()
|
||||
content_end = content.b
|
||||
while begin < end:
|
||||
char = view.substr(begin)
|
||||
if char == old and self.escaped(begin - 1):
|
||||
view.replace(edit, sublime.Region(begin - 1, begin), '')
|
||||
end -= 1
|
||||
content_end -= 1
|
||||
elif char == new and not self.escaped(begin - 1):
|
||||
view.insert(edit, begin, '\\')
|
||||
end += 1
|
||||
content_end += 1
|
||||
begin += 1
|
||||
view.replace(edit, sublime.Region(bracket.a, bracket.a + 1), new)
|
||||
view.replace(edit, sublime.Region(end - 1, end), new)
|
||||
view.end_edit(edit)
|
||||
self.attr.set_bracket(sublime.Region(bracket.a, end))
|
||||
self.attr.set_content(sublime.Region(content.a, content_end))
|
||||
self.attr.set_selection([sublime.Region(content_end, content_end)])
|
@ -1,47 +0,0 @@
|
||||
import bracket_plugin
|
||||
|
||||
|
||||
class select_attr(bracket_plugin.BracketPluginCommand):
|
||||
def run(self, bracket, content, selection, direction='right'):
|
||||
tag_name = '[\w\:\-]+'
|
||||
attr_name = '([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?'
|
||||
name = self.view.find(tag_name, bracket.a)
|
||||
current = selection[0].b
|
||||
region = self.view.find(attr_name, name.b)
|
||||
|
||||
if direction == 'left':
|
||||
last = None
|
||||
|
||||
# Keep track of last attr
|
||||
if region != None and current <= region.b and region.b < content.a:
|
||||
last = region
|
||||
|
||||
while region != None and region.b < content.a:
|
||||
# Select attribute until you have closest to the left of selection
|
||||
if current > region.b:
|
||||
selection = [region]
|
||||
last = None
|
||||
# Update last attr
|
||||
elif last != None:
|
||||
last = region
|
||||
region = self.view.find(attr_name, region.b)
|
||||
# Wrap right
|
||||
if last != None:
|
||||
selection = [last]
|
||||
else:
|
||||
first = None
|
||||
# Keep track of first attr
|
||||
if region != None and region.b < content.a:
|
||||
first = region
|
||||
|
||||
while region != None and region.b < content.a:
|
||||
# Select closest attr to the right of the selection
|
||||
if current < region.b:
|
||||
selection = [region]
|
||||
first = None
|
||||
break
|
||||
region = self.view.find(attr_name, region.b)
|
||||
# Wrap left
|
||||
if first != None:
|
||||
selection = [first]
|
||||
self.attr.set_selection(selection)
|
@ -1,9 +0,0 @@
|
||||
import bracket_plugin
|
||||
|
||||
|
||||
class select_tag(bracket_plugin.BracketPluginCommand):
|
||||
def run(self, bracket, content, selection):
|
||||
tag_name = '[\w\:\-]+'
|
||||
region1 = self.view.find(tag_name, bracket.a)
|
||||
region2 = self.view.find(tag_name, content.b)
|
||||
self.attr.set_selection([region1, region2])
|
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 101 B |
Before Width: | Height: | Size: 190 B |
@ -1 +0,0 @@
|
||||
{"url": "https://github.com/facelessuser/BracketHighlighter", "version": "2012.10.01.02.30.26", "description": "Bracket and tag highlighter for Sublime Text 2"}
|
@ -1,212 +0,0 @@
|
||||
# About
|
||||
This is a fork of pyparadigm's SublimeBrackets and SublimeTagmatcher (both are no longer available). I forked this to fix some issues I had and to add some features I wanted. I also wanted to improve the efficiency of the matching. This cuts down on the parallel searching that is now streamlined in one search. Since then, many new features have been added as well.
|
||||
|
||||
![Options Screenshot](https://github.com/facelessuser/BracketHighlighter/raw/master/example.png)
|
||||
|
||||
# Installation
|
||||
- Download is available in Package Control or you can [download](https://github.com/facelessuser/BracketHighlighter/zipball/master "download") or clone directly and drop into your Sublime Text 2 packages directory (plugin folder must be named BracketHighlighter)
|
||||
- You may need to restart Sublime Text 2 after installation
|
||||
|
||||
# Features
|
||||
- Customizable highlighting of brackets (),[],<>,{}
|
||||
- Customizable highlighting of Tags (supports unary tags and supports self closing /> (HTML5 coming))
|
||||
- Customizable highlighting of quotes
|
||||
- Selectively disable or enable specific matching of tags, brackets, or quotes
|
||||
- Selectively whitelist or blacklist matching of specific tags, brackets, or quotes based on language
|
||||
- When using on demand shortcut, show line count and char count between match in the status bar
|
||||
- Shortcuts for moving cursor to beginning or end of bracketed content (will focus on beginning or end bracket if not currently multi-selecting)
|
||||
- Shortcut for selecting all of the bracketed content
|
||||
- Shortcut for chaning quote style (accounts for escaped quotes as well)
|
||||
- Works with multi-select
|
||||
- Bracket related plugins
|
||||
- Configurable custom gutter icons
|
||||
- Highlight brackets within strings
|
||||
- Toggle bracket escape mode for string brackets (regex|string)
|
||||
- Experimental CFML support (read below for more info)
|
||||
|
||||
# Included Plugins
|
||||
- bracketselect: move cursor to opening bracket or closing bracket or select all content between brackets
|
||||
- foldbracket: fold according to brackets
|
||||
- swapbrackets: change the current selected brackets to another bracket type
|
||||
- swapquotes: change the currently selected quotes from single to double or double to single (scope based)
|
||||
- tagattrselect: cycle through selecting html tags
|
||||
- tagnameselect: select the name in the opening and closing tag
|
||||
|
||||
# Options
|
||||
- Open BracketHighlighter.sublime-settings and configure your preferences (can be accessed from menu).
|
||||
- Change the scope, highlight style, icon for bracket types, which brackets to match, set search thresholds, etc.
|
||||
- Save the file and your options should take effect immediately.
|
||||
|
||||
# CFML support
|
||||
CFML support is currently experimental. In order to enable it, you must add the CFML lanugage name to the whitelist (or exclude it from the list if using blacklist). If using the ColdFusion from https://github.com/SublimeText/ColdFusion, you can follow the example below:
|
||||
|
||||
```js
|
||||
"angle_language_list" : ["HTML","HTML 5","XML","PHP", "ColdFusion", "ColdFusionCFC"],
|
||||
"tag_language_list" : ["HTML","HTML 5","XML","PHP", "ColdFusion", "ColdFusionCFC"],
|
||||
```
|
||||
|
||||
After that, you must make sure ```tag_type``` is set to ```cmfl``` like below:
|
||||
|
||||
```js
|
||||
"tag_type" : "cfml",
|
||||
```
|
||||
|
||||
It is also good to make sure that self-closing detection is enalbed (this is also experimental):
|
||||
|
||||
```js
|
||||
"detect_self_closing_tags": true,
|
||||
```
|
||||
|
||||
#Changing Colors
|
||||
The color is based on the scope you assign to the highlight. The color of the scope is defined by your theme file. By default, the scope is "entity.name.class", but you could change it to "keyword" or any other scope in your theme.
|
||||
|
||||
```js
|
||||
//Scope? (Defined in theme files.)
|
||||
//Examples: (keyword|string|number)
|
||||
"quote_scope" : "entity.name.class",
|
||||
"curly_scope" : "entity.name.class",
|
||||
"round_scope" : "entity.name.class",
|
||||
"square_scope": "entity.name.class",
|
||||
"angle_scope" : "entity.name.class",
|
||||
"tag_scope" : "entity.name.class",
|
||||
```
|
||||
|
||||
If you want more control of the colors, you can define your own scopes.
|
||||
|
||||
```xml
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Bracket Tag</string>
|
||||
<key>scope</key>
|
||||
<string>brackethighlighter.tag</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FD971F</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Bracket Curly</string>
|
||||
<key>scope</key>
|
||||
<string>brackethighlighter.curly</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#66D9EF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Bracket Round</string>
|
||||
<key>scope</key>
|
||||
<string>brackethighlighter.round</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#F92672</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Bracket Square</string>
|
||||
<key>scope</key>
|
||||
<string>brackethighlighter.square</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A6E22E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Bracket Angle</string>
|
||||
<key>scope</key>
|
||||
<string>brackethighlighter.angle</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AE81FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Bracket Quote</string>
|
||||
<key>scope</key>
|
||||
<string>brackethighlighter.quote</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FAF60A</string>
|
||||
</dict>
|
||||
</dict>
|
||||
```
|
||||
|
||||
# Version 1.9.0
|
||||
- Add experimental CFML support (defaulted off)
|
||||
- Add auto-detection of self-closing tags (defaulted on)
|
||||
|
||||
# Version 1.8.0
|
||||
- Add new commands: "Show Bracket String Escape Mode" and "Toggle Bracket String Escape Mode". Default is "regex"
|
||||
|
||||
# Version 1.7.2
|
||||
- Feed general bracket type to bracket plugins
|
||||
- Adjust bracket select plugin to better handle HTML tags
|
||||
|
||||
# Version 1.7.1
|
||||
- Reorganize some settings
|
||||
- Limit auto-highlight selections by configurable threshold setting
|
||||
|
||||
# Version 1.7.0
|
||||
- Hide parent quote highlighting when child quotes are highlighted
|
||||
- Allow the searching for brackets in non-quoted code scoped as strings (like regex)
|
||||
- Add setting "highlight_string_brackets_only" which allows never highlighting quotes but leaves internal string bracket highlighting on
|
||||
- deprecate "enable_forward_slash_regex_strings" in favor of "find_brackets_in any_strings"
|
||||
|
||||
# Version 1.6.2
|
||||
- Fix adjacent_only with multi_select
|
||||
|
||||
# Version 1.6.1
|
||||
- Suppress string highlighting when adjacent_only is set, but allow internal string brackets to still get highlighted with adjacent_only settings if match_string_brackets is true
|
||||
|
||||
# Version 1.6.0
|
||||
- Add setting to match only when cursor is between brackets
|
||||
|
||||
# Version 1.5.3
|
||||
- Allow turning off gutter icons for multi-select via settings
|
||||
- Fix multi-select detection
|
||||
- Default the internal settings if setting is not found
|
||||
|
||||
# Version 1.5.2
|
||||
- Use tiny icons when line height is less than 16
|
||||
- Use no icon if icon cannot be found
|
||||
- Optimize png icons
|
||||
|
||||
# Version 1.5.1
|
||||
- Ignore selection/edit events inside the main routine
|
||||
|
||||
# Version 1.5.0
|
||||
- More responsive highlighting (thanks tito); delay setting no longer needed
|
||||
- Organize bracket plugins
|
||||
- Included more configurable custom gutter icons
|
||||
|
||||
# Version 1.4.1
|
||||
- Make adjusment to regex modifier code to correctly count back modifiers in perl
|
||||
|
||||
# Version 1.4.0
|
||||
- Account for perl regex, substitutions, and translations surrounded by "/" for string bracket matching
|
||||
- Account for regex modifiers when matching regex surrounded by "/" in javascript and perl
|
||||
|
||||
# Version 1.3.0
|
||||
- Fixed escaped brackets in string handling. Also a bit more efficient.
|
||||
|
||||
# Version 1.2.0
|
||||
- Fix angle bracket avoidance when finding brackets inside strings, and make it cleaner
|
||||
|
||||
# Version 1.1.0
|
||||
- Add python raw string support for quote highlighting
|
||||
- Add highlighting of brackets in strings; will work in all strings, but mainly meant for regex. True by default
|
||||
- Add support for targetting regex strings like in javascript that are scoped as strings, but are not quoted, but use '/'s. True by default
|
||||
|
||||
# Version 1.0.0
|
||||
- All previous work and releases
|
@ -1,142 +0,0 @@
|
||||
<?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>fileTypes</key>
|
||||
<array>
|
||||
<string>build</string>
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string><[^!?/>]+|<!--</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>/>|</[^?>]+|--></string>
|
||||
<key>name</key>
|
||||
<string>NAnt Build File</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string><!--</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.nant</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>--></string>
|
||||
<key>name</key>
|
||||
<string>comment.block.nant</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(</?)([-_a-zA-Z0-9:]+)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.tag.nant</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.tag.nant</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(/?>)</string>
|
||||
<key>name</key>
|
||||
<string>meta.tag.nant</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string> ([a-zA-Z-]+)</string>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.nant</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.nant</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.nant</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.nant</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.nant</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.nant</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.nant</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.constant.nant</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.constant.nant</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(&)([a-zA-Z]+|#[0-9]+|#x[0-9a-fA-F]+)(;)</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.entity.nant</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>&</string>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal.bad-ampersand.nant</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.nant-build</string>
|
||||
<key>uuid</key>
|
||||
<string>1BA72668-707C-11D9-A928-000D93589AF6</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,530 +0,0 @@
|
||||
<?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>fileTypes</key>
|
||||
<array>
|
||||
<string>cs</string>
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>^\s*/\*|^(?![^{]*?//|[^{]*?/\*(?!.*?\*/.*?\{)).*?\{\s*($|//|/\*(?!.*?\*/.*\S))</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>^\s*\*/|^\s*\}</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~C</string>
|
||||
<key>name</key>
|
||||
<string>C#</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>///</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>$\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.documentation.source.cs</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(</?)(?:([-_a-zA-Z0-9]+)((:)))?([-_a-zA-Z0-9:]+)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.tag.source.cs</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.tag.namespace.source.cs</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.tag.source.cs</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.namespace.source.cs</string>
|
||||
</dict>
|
||||
<key>5</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.tag.localname.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(/?>)</string>
|
||||
<key>name</key>
|
||||
<string>keyword.other.documentation.source.cs</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.namespace.source.cs</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.source.cs</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.separator.namespace.source.cs</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.other.attribute-name.localname.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string> (?:([-_a-zA-Z0-9]+)((:)))?([_a-zA-Z-]+)=</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#doubleQuotedString</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#singleQuotedString</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#comments</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)^\s*
|
||||
((?:\b(?:new|public|protected|internal|private|abstract|sealed|static)\b\s)*)
|
||||
(class)\s+
|
||||
([A-Za-z_]\w+)\b</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.source.cs</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.source.cs</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.class.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>{</string>
|
||||
<key>name</key>
|
||||
<string>meta.definition.class.source.cs</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#classInheritance</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<!--
|
||||
Disabled because it causes some lines to be interpreted incorrectly, for example:
|
||||
else if (c == ')')
|
||||
--->
|
||||
<!--
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)^\s* # start of line
|
||||
((?:\b(?:new|public|protected|internal|private|static|virtual|sealed|override|abstract|extern)\b\s*)*) # method-modifiers
|
||||
\b((?:\w+\.)*[A-Za-z_]\w*)\b\s* # type
|
||||
(operator)\s+ # operator overload
|
||||
((?:\+|-|!|~|\+\+|--|true|false|\*|/|%|\&|\||\^|<<|>>|==|!=|<|>|<=|>=)\s*) # operator name
|
||||
(?=\()</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.source.cs</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.source.cs</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.source.cs</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\)</string>
|
||||
<key>name</key>
|
||||
<string>meta.definition.operator.source.cs</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#statementRemainder</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)^\s* # start of line
|
||||
((?:\b(?:new|public|protected|internal|private|static|virtual|sealed|override|abstract|extern)\b\s*)*) # method-modifiers
|
||||
\b((?:\w+\.)*[A-Za-z_]\w*)\b\s* # type
|
||||
([A-Za-z_]\w*)\s* # name
|
||||
(?=\()</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.source.cs</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.source.cs</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\)</string>
|
||||
<key>name</key>
|
||||
<string>meta.definition.method.source.cs</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#statementRemainder</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
-->
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(true|false|null|this|base)\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(if|else|while|for|foreach|do|return|continue|break|switch|case|default|goto|throw|try|catch|finally|lock|yield)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(new|is|checked|unchecked|typeof|sizeof|override|in|out|ref|readonly|params|stackalloc|as)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(event|delegate|explicit|implicit|in|set|get)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.other.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(internal|public|protected|private|static|const|new|sealed|abstract|override|extern|unsafe|readonly|volatile|operator)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#doubleQuotedStringLiteral</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#doubleQuotedString</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#singleQuotedString</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.other.using.source.cs</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.package.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^\s*(using)\s+([^ ;]*);</string>
|
||||
<key>name</key>
|
||||
<string>meta.keyword.using.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#builtinTypes</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.other.namespace.source.cs</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.namespace.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^\s*(namespace)\s+([^ ]+)(?:\s*{)?$</string>
|
||||
<key>name</key>
|
||||
<string>meta.keyword.namespace.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.import.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(#)\s*(if|else|elif|endif|define|undef|warning|error|line|region|endregion)\b</string>
|
||||
<key>name</key>
|
||||
<string>meta.preprocessor.source.cs</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>repository</key>
|
||||
<dict>
|
||||
<key>builtinTypes</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|class|struct|enum|interface)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.source.cs</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>classInheritance</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>:</string>
|
||||
<key>end</key>
|
||||
<string>(?={)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>\s*,?([A-Za-z_]\w*)\b</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>comments</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>/\*</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\*/\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.block.source.cs</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(//).*$\n?</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.double-slash.source.cs</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>doubleQuotedString</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.source.cs</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.source.cs</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>doubleQuotedStringLiteral</key>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>@"([^"]|"")*"</string>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.literal.source.cs</string>
|
||||
</dict>
|
||||
<key>singleQuotedString</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.source.cs</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.xml</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.source.cs</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>statementRemainder</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\(</string>
|
||||
<key>end</key>
|
||||
<string>(?=\))</string>
|
||||
<key>name</key>
|
||||
<string>meta.definition.param-list.source.cs</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#builtinTypes</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>scopeName</key>
|
||||
<string>source.cs</string>
|
||||
<key>uuid</key>
|
||||
<string>1BA75B32-707C-11D9-A928-000D93589AF6</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,8 +0,0 @@
|
||||
<snippet>
|
||||
<description>#ifndef … #define … #endif</description>
|
||||
<content><![CDATA[#ifndef ${1/([A-Za-z0-9_]+).*/$1/}
|
||||
#define ${1:SYMBOL} ${2:value}
|
||||
#endif]]></content>
|
||||
<tabTrigger>def</tabTrigger>
|
||||
<scope>source.c, source.c++, source.objc, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>#include <…></description>
|
||||
<content><![CDATA[#include <${1:.h}>]]></content>
|
||||
<tabTrigger>Inc</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>#include "…"</description>
|
||||
<content><![CDATA[#include "${1:${TM_FILENAME/\..+$/.h/}}"]]></content>
|
||||
<tabTrigger>inc</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>$1.begin(), $1.end()</description>
|
||||
<content><![CDATA[${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}begin(), ${1:v}${1/^.*?(-)?(>)?$/(?2::(?1:>:.))/}end()]]></content>
|
||||
<tabTrigger>beginend</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,10 +0,0 @@
|
||||
<snippet>
|
||||
<description>main()</description>
|
||||
<content><![CDATA[int main(int argc, char const${TM_C_POINTER: *}argv[])
|
||||
{
|
||||
${0:/* code */}
|
||||
return 0;
|
||||
}]]></content>
|
||||
<tabTrigger>main</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,9 +0,0 @@
|
||||
<snippet>
|
||||
<description>For Loop</description>
|
||||
<content><![CDATA[for (int ${2:i} = 0; $2 < ${1:count}; ${3:++$2})
|
||||
{
|
||||
${0:/* code */}
|
||||
}]]></content>
|
||||
<tabTrigger>for</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
|
||||
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
|
||||
"working_dir": "${file_path}",
|
||||
"selector": "source.c, source.c++",
|
||||
|
||||
"variants":
|
||||
[
|
||||
{
|
||||
"name": "Run",
|
||||
"cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
|
||||
}
|
||||
]
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extensions": ["cpp", "cc", "cxx", "c++", "h", "hpp", "hxx", "h++", "inl", "ipp"]
|
||||
}
|
@ -1,491 +0,0 @@
|
||||
<?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>comment</key>
|
||||
<string>I don't think anyone uses .hp. .cp tends to be paired with .h. (I could be wrong. :) -- chris</string>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>cpp</string>
|
||||
<string>cc</string>
|
||||
<string>cp</string>
|
||||
<string>cxx</string>
|
||||
<string>c++</string>
|
||||
<string>C</string>
|
||||
<string>h</string>
|
||||
<string>hh</string>
|
||||
<string>hpp</string>
|
||||
<string>hxx</string>
|
||||
<string>h++</string>
|
||||
<string>inl</string>
|
||||
<string>ipp</string>
|
||||
</array>
|
||||
<key>firstLineMatch</key>
|
||||
<string>-\*- C\+\+ -\*-</string>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>(?x)
|
||||
/\*\*(?!\*)
|
||||
|^(?![^{]*?//|[^{]*?/\*(?!.*?\*/.*?\{)).*?\{\s*($|//|/\*(?!.*?\*/.*\S))
|
||||
</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>(?<!\*)\*\*/|^\s*\}</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~C</string>
|
||||
<key>name</key>
|
||||
<string>C++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#special_block</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>source.c</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(friend|explicit|virtual)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(private:|protected:|public:)</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(catch|operator|try|throw|using)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\bdelete\b(\s*\[\])?|\bnew\b(?!])</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>comment</key>
|
||||
<string>common C++ instance var naming idiom -- fMemberName</string>
|
||||
<key>match</key>
|
||||
<string>\b(f|m)[A-Z]\w*\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.other.readwrite.member.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(this)\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.language.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\btemplate\b\s*</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.template.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\b\s*</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.cast.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(class|wchar_t)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(export|mutable|typename)\b</string>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.c++</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)
|
||||
(?: ^ # begin-of-line
|
||||
| (?: (?<!else|new|=) ) # or word + space before name
|
||||
)
|
||||
((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name
|
||||
\s*(\() # start bracket or end-of-line
|
||||
</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.c++</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\)</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>meta.function.destructor.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)
|
||||
(?: ^ # begin-of-line
|
||||
| (?: (?<!else|new|=) ) # or word + space before name
|
||||
)
|
||||
((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name
|
||||
\s*(\() # terminating semi-colon
|
||||
</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.c++</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\)</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>meta.function.destructor.prototype.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>repository</key>
|
||||
<dict>
|
||||
<key>angle_brackets</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string><</string>
|
||||
<key>end</key>
|
||||
<string>></string>
|
||||
<key>name</key>
|
||||
<string>meta.angle-brackets.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#angle_brackets</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>block</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\{</string>
|
||||
<key>end</key>
|
||||
<string>\}</string>
|
||||
<key>name</key>
|
||||
<string>meta.block.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.function.any-method.c</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(?x)
|
||||
(
|
||||
(?!while|for|do|if|else|switch|catch|enumerate|return|r?iterate)(?: \b[A-Za-z_][A-Za-z0-9_]*+\b | :: )*+ # actual name
|
||||
)
|
||||
\s*(\()</string>
|
||||
<key>name</key>
|
||||
<string>meta.function-call.c</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>constructor</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)
|
||||
(?: ^\s*) # begin-of-line
|
||||
((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*) # actual name
|
||||
\s*(\() # start bracket or end-of-line
|
||||
</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.c++</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\)</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>meta.function.constructor.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?x)
|
||||
(:) # begin-of-line
|
||||
((?=\s*[A-Za-z_][A-Za-z0-9_:]* # actual name
|
||||
\s*(\())) # start bracket or end-of-line
|
||||
</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.parameters.c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?=\{)</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.constructor.initializer-list.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>special_block</key>
|
||||
<dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\b(namespace)\s+([A-Za-z_][_A-Za-z0-9:]*\b)?+(?!\s*?(;|=|,))</string>
|
||||
<key>end</key>
|
||||
<string>(?<=\})</string>
|
||||
<key>name</key>
|
||||
<string>meta.namespace-block.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\{</string>
|
||||
<key>end</key>
|
||||
<string>\}</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#special_block</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#constructor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\b(class|struct)\s+([_A-Za-z][_A-Za-z0-9]*\b)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.type.c++</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.c++</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<=\})|(?=(;|,|\(|\)|>|\[|\]))</string>
|
||||
<key>name</key>
|
||||
<string>meta.class-struct-block.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#angle_brackets</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(\{)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.scope.c++</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(\})(\s*\n)?</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.invalid.c++</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal.you-forgot-semicolon.c++</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#special_block</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#constructor</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\b(extern)(?=\s*")</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>storage.modifier.c++</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?<=\})|(?=\w)</string>
|
||||
<key>name</key>
|
||||
<string>meta.extern-block.c++</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\{</string>
|
||||
<key>end</key>
|
||||
<string>\}</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>#special_block</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>$base</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>scopeName</key>
|
||||
<string>source.c++</string>
|
||||
<key>uuid</key>
|
||||
<string>26251B18-6B1D-11D9-AFDB-000D93589AF6</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,42 +0,0 @@
|
||||
<?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.c, source.c++, source.objc, source.objc++</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>shellVariables</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START</string>
|
||||
<key>value</key>
|
||||
<string>// </string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START_2</string>
|
||||
<key>value</key>
|
||||
<string>/*</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_END_2</string>
|
||||
<key>value</key>
|
||||
<string>*/</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_DISABLE_INDENT_2</string>
|
||||
<key>value</key>
|
||||
<string>yes</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>38DBCCE5-2005-410C-B7D7-013097751AC8</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,13 +0,0 @@
|
||||
<?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>scope</key>
|
||||
<string>source.c, source.c++, source.objc, source.objc++</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>cancelCompletion</key>
|
||||
<string>^\s*(\}?\s*(else|try|do)|(class|struct|enum|namespace)\s*[a-zA-Z_0-9]+*)$</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>Enumeration</description>
|
||||
<content><![CDATA[enum ${1:name} { $0 };]]></content>
|
||||
<tabTrigger>enum</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,40 +0,0 @@
|
||||
<?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>Indentation Rules</string>
|
||||
<key>scope</key>
|
||||
<string>source.c, source.c++, source.objc, source.objc++</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>decreaseIndentPattern</key>
|
||||
<string>(?x)
|
||||
^ (.*\*/)? \s* \} .* $
|
||||
| ^ \s* (public|private|protected): \s* $
|
||||
| ^ \s* @(public|private|protected) \s* $
|
||||
</string>
|
||||
<key>increaseIndentPattern</key>
|
||||
<string>(?x)
|
||||
^ .* \{ [^}"']* $
|
||||
| ^ \s* (public|private|protected): \s* $
|
||||
| ^ \s* @(public|private|protected) \s* $
|
||||
</string>
|
||||
|
||||
<key>bracketIndentNextLinePattern</key>
|
||||
<string>(?x)
|
||||
^ \s* \b(if|while|else)\b [^;]* $
|
||||
| ^ \s* \b(for)\b .* $
|
||||
</string>
|
||||
|
||||
<key>unIndentedLinePattern</key>
|
||||
<string>^\s*((/\*|.*\*/|//|#|template\b.*?>(?!\(.*\))|@protocol|@interface(?!.*\{)|@implementation|@end).*)?$</string>
|
||||
|
||||
<key>indentSquareBrackets</key>
|
||||
<true/>
|
||||
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>02EB44C6-9203-4F4C-BFCB-7E3360B12812</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,20 +0,0 @@
|
||||
<?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>bundleUUID</key>
|
||||
<string>4675A940-6227-11D9-BFB1-000D93589AF6</string>
|
||||
<key>name</key>
|
||||
<string>Symbol List: Indent Class Methods</string>
|
||||
<key>scope</key>
|
||||
<string>meta.class-struct-block.c++ entity.name.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>symbolTransformation</key>
|
||||
<string>
|
||||
s/^\s*/ /; # pad</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>B2B97E23-E686-4410-991D-A92AF3A9FC95</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,20 +0,0 @@
|
||||
<?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: Prefix Banner Items</string>
|
||||
<key>scope</key>
|
||||
<string>meta.toc-list.banner</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>symbolTransformation</key>
|
||||
<string>
|
||||
s/^\s+/# /;
|
||||
s/^=+$/-/;
|
||||
</string>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>A8E4E48A-81F3-4DB7-A7A2-88662C06E011</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>Typedef</description>
|
||||
<content><![CDATA[typedef ${1:int} ${2:MyCustomType};]]></content>
|
||||
<tabTrigger>td</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,13 +0,0 @@
|
||||
<snippet>
|
||||
<name>Class</name>
|
||||
<content><![CDATA[class ${1:${TM_FILENAME/(.+)\..+|.*/$1/:name}}
|
||||
{
|
||||
public:
|
||||
${1/(\w+).*/$1/}(${2:arguments});
|
||||
~${1/(\w+).*/$1/}();
|
||||
|
||||
${0:/* data */}
|
||||
};]]></content>
|
||||
<tabTrigger>class</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,9 +0,0 @@
|
||||
<snippet>
|
||||
<description>Do While Loop</description>
|
||||
<content><![CDATA[do
|
||||
{
|
||||
${0:/* code */}
|
||||
} while (${1:/* condition */});]]></content>
|
||||
<tabTrigger>do</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,9 +0,0 @@
|
||||
<snippet>
|
||||
<description>Vector For Loop</description>
|
||||
<content><![CDATA[for (std::vector<$1>::iterator ${3:i} = $2.begin(); $3 != $2.end(); ++$3)
|
||||
{
|
||||
$0
|
||||
}]]></content>
|
||||
<tabTrigger>forv</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>fprintf …</description>
|
||||
<content><![CDATA[fprintf(${1:stderr}, "${2:%s}\\n"${2/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$3${2/([^%]|%%)*(%.)?.*/(?2:\);)/}]]></content>
|
||||
<tabTrigger>fprintf</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,9 +0,0 @@
|
||||
<snippet>
|
||||
<description>If Condition</description>
|
||||
<content><![CDATA[if (${1:/* condition */})
|
||||
{
|
||||
${0:/* code */}
|
||||
}]]></content>
|
||||
<tabTrigger>if</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,10 +0,0 @@
|
||||
<snippet>
|
||||
<description>Namespace</description>
|
||||
<content><![CDATA[namespace${1/.+/ /m}${1:${TM_FILENAME/^((.*?)\..*)?$/$2/:mine}}
|
||||
{
|
||||
$0
|
||||
}
|
||||
]]></content>
|
||||
<tabTrigger>ns</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>printf …</description>
|
||||
<content><![CDATA[printf("${1:%s}\\n"${1/([^%]|%%)*(%.)?.*/(?2:, :\);)/}$2${1/([^%]|%%)*(%.)?.*/(?2:\);)/}]]></content>
|
||||
<tabTrigger>printf</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,13 +0,0 @@
|
||||
<snippet>
|
||||
<description>Read File Into Vector</description>
|
||||
<content><![CDATA[std::vector<char> v;
|
||||
if (FILE${TM_C_POINTER: *}fp = fopen(${1:"filename"}, "r"))
|
||||
{
|
||||
char buf[1024];
|
||||
while (size_t len = fread(buf, 1, sizeof(buf), fp))
|
||||
v.insert(v.end(), buf, buf + len);
|
||||
fclose(fp);
|
||||
}]]></content>
|
||||
<tabTrigger>readfile</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>std::map</description>
|
||||
<content><![CDATA[std::map<${1:key}, ${2:value}> map$0;]]></content>
|
||||
<tabTrigger>map</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>std::vector</description>
|
||||
<content><![CDATA[std::vector<${1:char}> v$0;]]></content>
|
||||
<tabTrigger>vector</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,9 +0,0 @@
|
||||
<snippet>
|
||||
<name>Struct</name>
|
||||
<content><![CDATA[struct ${1:${TM_FILENAME/(.+)\..+|.*/$/:name}}
|
||||
{
|
||||
${0:/* data */}
|
||||
};]]></content>
|
||||
<tabTrigger>struct</tabTrigger>
|
||||
<scope>source.c, source.objc, source.c++, source.objc++</scope>
|
||||
</snippet>
|
@ -1,6 +0,0 @@
|
||||
<snippet>
|
||||
<description>template <typename ${1:_InputIter}></description>
|
||||
<content><![CDATA[template <typename ${1:_InputIter}>]]></content>
|
||||
<tabTrigger>tp</tabTrigger>
|
||||
<scope>source.c++, source.objc++</scope>
|
||||
</snippet>
|
BIN
sublimetext2/Packages/CSS/.DS_Store
vendored
@ -1,36 +0,0 @@
|
||||
<?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.css</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>shellVariables</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_START</string>
|
||||
<key>value</key>
|
||||
<string>/*</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_END</string>
|
||||
<key>value</key>
|
||||
<string>*/</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>TM_COMMENT_DISABLE_INDENT</string>
|
||||
<key>value</key>
|
||||
<string>yes</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>uuid</key>
|
||||
<string>375CF370-8A7B-450A-895C-FD18B47957E2</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,27 +0,0 @@
|
||||
[
|
||||
{ "keys": [":"], "command": "insert_snippet", "args": {"contents": ":$0;"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": [";"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^;", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ":$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^;", "match_all": true }
|
||||
]
|
||||
}
|
||||
]
|
@ -1,27 +0,0 @@
|
||||
[
|
||||
{ "keys": [":"], "command": "insert_snippet", "args": {"contents": ":$0;"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": [";"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^;", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ":$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^;", "match_all": true }
|
||||
]
|
||||
}
|
||||
]
|
@ -1,27 +0,0 @@
|
||||
[
|
||||
{ "keys": [":"], "command": "insert_snippet", "args": {"contents": ":$0;"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\}|$)", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": [";"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^;", "match_all": true }
|
||||
]
|
||||
},
|
||||
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
|
||||
[
|
||||
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
||||
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
||||
{ "key": "selector", "operator": "equal", "operand": "source.css - meta.selector.css", "match_all": true },
|
||||
{ "key": "preceding_text", "operator": "regex_contains", "operand": ":$", "match_all": true },
|
||||
{ "key": "following_text", "operator": "regex_contains", "operand": "^;", "match_all": true }
|
||||
]
|
||||
}
|
||||
]
|