How can I change a theme to set a background color to the current line in TextMate 2?

avernet picture avernet · Jan 10, 2012 · Viewed 9.8k times · Source

In TextMate 1, we could use the Preferences dialog for this. In TextMate 2, at least at this point, I gather we have to use Edit Bundles, and edit the source of a specific theme. But what is the syntax to set a background color to the current line (i.e. the line on which the cursor is)?

Answer

jake picture jake · Jan 18, 2012

While editing the theme files have you looked at this particular setting, just pasting a snippet from a theme I saw it in. (Havent actually tried to see if this works, sorry)

settings = {
    background = '#FFFFFF';
    caret = '#000000';
    foreground = '#000000';
    invisibles = '#BFBFBF';
    lineHighlight = '#FFFBD1';
    selection = '#BDD5FC';
};

I am referring to the lineHighlight option in the settings above.