Sublime Text 2: How do I change the color that the row number is highlighted?

Sublimetext

Sublimetext Problem Overview


As the subject says, I want to change to something other than the very light grey as shown below (line 319). I have a hard time seeing that, especially when doing a 'find in files' command.

enter image description here

Sublimetext Solutions


Solution 1 - Sublimetext

The easy way: Pick an alternative Color Scheme:

Preferences > Color Scheme > ...pick one

The more complicated way: Edit the current color scheme file:

Preferences > Browse Packages > Color Scheme - Default > ... edit the Color Scheme file you are using:

Looking at the structure of the XML, drill down into dict > settings > settings > dict >

Look for the key (or add it if it's missing): lineHighlight. Add a string with an #RRGGBB or #RRGGBBAA format.

Solution 2 - Sublimetext

On windows 7, find

C:\Users\Simion\AppData\Roaming\Sublime Text 2\Packages\Color Scheme - Default

Find your color scheme file, open it, and find lineHighlight.
Ex:

<key>lineHighlight</key>
<string>#ccc</string>

replace #ccc with your preferred background color.

Solution 3 - Sublimetext

tmtheme-editor.herokuapp.com seems pretty nice.

On the mac, the default theme files are in ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Color\ Scheme\ -\ Default

On Win7, the default theme files are in %appdata%\Sublime Text 2\Packages\Color Scheme - Default

Solution 4 - Sublimetext

For Sublime Text 3, all I had to do was add "highlight_line": true to my user settings file: Preferences -> Settings - User. It was only once that preference was set that all the color scheme lineHighlight settings took effect.

Hopefully this will save someone else some of this same flailing about.

Solution 5 - Sublimetext

This post is for Sublime 3.

I just installed Sublime 3, the 64 bit version, on Ubuntu 14.04. I can't tell the difference between this version and Sublime 2 as far as user interface. The reason I didn't go with Sublime 2 is that it gives an annoying "GLib critical" error messages.

Anyways - previous posts mentioned the file /sublime_text_3/Packages/Color\ Scheme\ -\ Default.sublime-package

I wanted to give two tips here with respect to this file in Sublime 3:

  1. You can edit it with pico and use ^W to search the theme name. The first search result will bring you to an XML style entry where you can change the values. Make a copy before you experiment.
  2. If you choose the theme in the sublime menu (under Preferences/Color Scheme) before you change this file, then the changes will be cached and your change will not take effect. So delete the cached version and restart sublime for the changes to take effect. The cached version is at ~/.config/sublime-text-3/Cache/Color Scheme - Default/

Solution 6 - Sublimetext

If you have SublimeLinter installed, your theme (at least it ST3) may end up in .../Packages/User/SublimeLinter/[ your-chosen-theme ]

As mentioned above - find the nested 'settings' dict and edit or add the 'lineHighlight' entry with your desired #RRGGBB or #RRGGBBAA. I like #0000AA99 when on a black(ish) background.

Handy tool if you do not know your color combinations: RGBtoHEX and HEXtoRGB

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionphirschybarView Question on Stackoverflow
Solution 1 - SublimetextJake WilsonView Answer on Stackoverflow
Solution 2 - SublimetextSimion AgavriloaeiView Answer on Stackoverflow
Solution 3 - SublimetextJared BeckView Answer on Stackoverflow
Solution 4 - SublimetextTroy SView Answer on Stackoverflow
Solution 5 - SublimetextClaudeView Answer on Stackoverflow
Solution 6 - SublimetextWayne WeibelView Answer on Stackoverflow