Sublime Text Highlights Heredocs
Sublime Text allows an awesome syntax highlighting trick. If you name a here document something generic, like HEREDOC
, all the text within will be highlighted in one color, just like a Ruby string.
But if you name your here document RUBY
, Sublime will override the normal highlighting and maintain Ruby-specific syntax highlighting within the here document. Same goes for SQL
, JS
, and probably more.
This is cool because it makes here documents that contain code a lot easier to write and debug.
Tweet