Last active
August 29, 2015 14:07
-
-
Save NearlyUnique/7e53cf6c80317f7ab8d6 to your computer and use it in GitHub Desktop.
in "%APPDATA%\Sublime Text 2\Packages\Log", add 2 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
md "%APPDATA%\Sublime Text 2\Packages\Log" | |
pushd "%APPDATA%\Sublime Text 2\Packages\Log" | |
copy con LogSyntax.json | |
// [PackageDev] target_format: plist, ext: tmLanguage | |
{ | |
"name": "Log File", | |
"scopeName": "logfile", | |
"fileTypes": ["log"], | |
"uuid": "58e4042d-72b2-4281-92f7-7bb0c38dba44", | |
"patterns": [{ | |
"match": "^\\d{4}[\\-]+\\d{1,2}[\\-]+\\d{1,2}\\s+(?:\\d{1,2}:?){3}[,.]\\d+", | |
"name": "entity.name.function" | |
},{ | |
"match": "DEBUG|INFO|ERROR|FATAL|WARN", | |
"name": "constant.numeric" | |
},{ | |
"match": "(?:[A-Z]\\w+\\.)+(?:[A-Z]\\w+)", | |
"name": "support.class" | |
} | |
] | |
} | |
^Z | |
copy con LogSyntax.tmLanguage | |
<?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>log</string> | |
</array> | |
<key>name</key> | |
<string>Log File</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>^\d{4}[\-]+\d{1,2}[\-]+\d{1,2}\s+(?:\d{1,2}:?){3}[,.]\d+</string> | |
<key>name</key> | |
<string>entity.name.function</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}</string> | |
<key>name</key> | |
<string>keyword.control.ssraw</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>DEBUG|INFO|ERROR|FATAL|WARN</string> | |
<key>name</key> | |
<string>constant.numeric</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>(?:[A-Z]\w+\.)+(?:[A-Z]\w+)</string> | |
<key>name</key> | |
<string>support.class</string> | |
</dict> | |
</array> | |
<key>scopeName</key> | |
<string>logfile</string> | |
<key>uuid</key> | |
<string>58e4042d-72b2-4281-92f7-7bb0c38dba44</string> | |
</dict> | |
</plist> | |
^Z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment