sublimetext3syntax-highlightingsublimetextsublimetext4

Is there a way to change the syntax color for the directory paths in the "Find results" tab in Sublime Text?


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.

enter image description here


Solution

  • 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:

    The 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:

    Find in Files using Neon Color Scheme

    * Note: I am the color scheme's author.