Sublime Forum

Possible to highlight_line for all lines in selection?

#1

A picture says a thousand words (hopefully it is clear… sorry I had to adjust colors)…

Basically what I want is to have the highlight_line option highlight all lines that are selected. As far as I can tell there aren’t any preferences for this or any ways to set this on a sublime.View in a plugin. Is there some way I can accomplish this in a plugin by pushing scopes or something like that? I’m pretty green when it comes to syntax customization.

Edit: If it isn’t clear, in that bottom image I want all lines to be fully highlighted with the highlight_line color, and then the selection itself will be a separate color on top (with better contrast once I get my color settings straightened out!)

0 Likes

#2

That’s not possible in the way that you want via a plugin, no. The line highlight color is something that Sublime does on it’s own when rendering. The only ways to apply color to things are via syntax highlighting or via regions.

Using syntax definitions, it’s possible to get a color that spans the whole line, but it would require the syntax definition to be able to recognize an entire line as a single construct, which is not how color schemes work and not something you want to try unless you only ever edit files in which you know the exact content up front.

Using Regions, you can apply colors that are sourced from your color scheme, but the color doesn’t span the whole line, only the visible text, such as in this example where there’s a green region on lines 1, 4 and 6.

0 Likes

#3

Hmm, well that’s unfortunate. I will live without it, but I’d love to see this as preference some day! Thanks for responding :slight_smile:

0 Likes

#4

thanks for the information.

0 Likes

#5

thanks for the awesome information.

0 Likes