

Now the log files are looking much more meaningful when opened in the Sublime Text editor.Sublime Text Editor has been around since 2008 and has remained one of the most intuitive, free, and feature-packed code editors on the market. scope gin.log mand settings foreground #F7860A fontStyle bold Users/ilkinulas/Library/Application Support/Sublime Text 2/Packages/Color Scheme - Default/Monokai.tmThemeīelow is a sample that defines color and text style for mand pattern (this was defined in the syntax definition on line 9 in the gist above). Here is the path to the theme file for Monokai in my computer. Our syntax definition will match the text with the regular expressions and the color theme will change the color and style of the displayed text.

In this step we are going to set colors and text styles (bold, italic vs). You can choose the syntax definition explicitly by View->Sytax menu. Sublime text automatically chooses your syntax definition if the file type matches. This will be used while defining colors in the color theme definition files. You can select syntax of the document in Sublime Text by View->Syntax as seen in the screenshot below. It is good for a starting point because it is simple. I have used this online tool to test the regular expressions.īelow is a syntax definition file for our logs. In this step you need to write regular expressions to match the text in your documents. Here is an official documentation about writing syntax definitions for Sublime Text. Create A New Syntax DefinitionĪfter installing PackageDev, create a new syntax definition file through Tools | Packages | Package Development as seen in the screenshot below.ĭefining a syntax is simply writing regular expressions to find text in the document. PackageDev is a Sublime Text package that helps create and edit syntax definitions, snippets, completions files, build systems and other Sublime Text extension files.

Package Control is a package manager for Sublime Text that makes it simple to find, install and keep packages up-to-date. Here is a step by step guide to write your custom syntax highlighting for Sublime Text editor: 1. Using tools like grep does not really help if you want to see the whole context.

If the log file contains a lot of information it may be difficult to see the most important parts. The idea of writing custom syntax definitions first came to light (for me) while looking at the log files generated by one of our games (By the way, I am working at PeakGames and we are building awesome mobile games). In case none of the supported highlightings covers your needs you can create your own. Sublime Text editor has built-in syntax highlighting support for too many languages.
