So when you search for a word in the whole project inside sublime text it opens a tab with a bunch of text containing the results of the search. Having all that text in the same color is a bit confusing for me so i want to know if there is a way to change at least the syntax color for the paths to the file that containts the similarity.
Briefly, syntax highlighting in Sublime is controlled by language syntax definition files that use a regex-based approach to assign scopes to different regions of text. Color scheme files then assign colors and font decorations (bold, italic, etc.) to the foregrounds and backgrounds of one or more scopes.
There are only a few scopes that color schemes can address in Find in Files:
text.find-in-files
entity.name.filename.find-in-files
, which highlights the filenameconstant.other.find-in-files
, which highlights lines beginning with ERROR
constant.numeric.line-number.find-in-files
, which highlights the line number of lines surrounding the resultconstant.numeric.line-number.match.find-in-files
, which highlights the line number containing the matchThe following basic rules will give you green filenames and underlined bold yellow matching line numbers
{
"name": "Find In Files: filename",
"scope": "entity.name.filename.find-in-files",
"foreground": "#06FF05"
},
{
"name": "Find In Files: Line Number - Match",
"scope": "constant.numeric.line-number.match.find-in-files",
"foreground": "#FFFF00",
"font_style": "bold italic underline"
},
Here is what that looks like using the Neon Color Scheme*, which has a black background, other more general rules that cover the line numbers, and rules for outlining Find results in pink:
* Note: I am the color scheme's author.