You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: make the active editor tab visually distinct #18692
In the RStudio editor pane, all document tabs render in essentially the same very light grey,
with the active tab only marginally lighter (closer to white) than the inactive ones. At a
glance -- especially with several tabs open -- it's genuinely hard to tell which file is
currently active without reading the (also small) tab label text. Sensible modern tabbed environments
do this automatically.
I tried switching themes (e.g. the community rsthemes collection) hoping one would give more
active/inactive tab contrast, but this doesn't fix it -- most themes only restyle the editor text
area (syntax highlighting), not the tab strip color/styling itself.
Request
Give the active document tab a clearly distinct visual treatment from inactive tabs -- e.g. a
bold/colored accent bar or underline, a stronger background contrast, or a bold tab label -- so
it's identifiable at a glance, independent of the current editor theme.
For reference, here's a screenshot of my UltraEdit window, with many, many tabs. This request is on the bottom row, RStudio-tabs.md, it is the active file: name bold and with a blue line at the top. This editor also lets me color the tabs by file type.
I know that this is more easily & generally done in VScode / positron, but I'm only asking for RStudio attention here.
Thanks for the detailed report — I dug into how tab styling actually works, and the answer splits into two parts: there is already a supported hook for this that a theme can use today, but the default contrast you're seeing is a genuine problem on our side.
The hook exists — themes can do this today
RStudio deliberately exposes a set of stable (non-obfuscated) CSS class names for exactly this kind of customization. From themeStyles.css:
/* These are exposed to allow users to customize RStudio further with their rsthemes. */
@external rstheme_tabLayoutCenter;
@external rstheme_toolbarWrapper;
...
An .rstheme file's CSS is applied to the whole IDE, not just the editor text area, and it's injected after our own stylesheet — so a theme can restyle the tab strip.
You can get the exact treatment you're describing (accent bar + bold label) by adding this to the end of your .rstheme file:
/* Active tab: blue accent bar along the top */.gwt-TabLayoutPanelTabs.gwt-TabLayoutPanelTab-selectedtable.rstheme_tabLayoutCenter{box-shadow:03px0#3465a4 inset;}/* Active tab: bold label */.gwt-TabLayoutPanelTabs.gwt-TabLayoutPanelTab-selectedtable.rstheme_tabLayoutCenter.gwt-Label{font-weight:600;}/* Optional: stronger background fill for the active tab. The global-theme class prefix is needed here to outweigh our default rule -- use .rstudio-themes-default (Modern light), .rstudio-themes-dark-grey (Modern dark), or .rstudio-themes-alternate (Sky). */.rstudio-themes-default.gwt-TabLayoutPanelTabs.gwt-TabLayoutPanelTab-selectedtable.rstheme_tabLayoutCenter{background:#ffffff;}
box-shadow ... inset is preferable to border-top because it doesn't shift the tab's layout.
This isn't theoretical — gadenbuie/rsthemes already ships this. For example night-owl.rstheme contains a 4px blue inset accent bar plus a font-weight: 600 label on the selected tab. So the mechanism works.
Why switching themes didn't help you: coverage, not capability. None of the 34 themes bundled with RStudio contain any tab-strip rules, and our tmTheme → .rstheme converter never generates them — it only emits editor/terminal rules. In third-party theme collections it's opt-in per theme, so most themes you tried simply had nothing to say about the tab strip.
One caveat: there is currently no stable class name that distinguishes the editor tab strip from the pane tab strips, so rules like the above will also restyle the Console/Terminal, Environment/History and Files/Plots/Packages tabs. Many people consider that a feature, but it isn't separable right now.
The default contrast is a fair complaint
Your request for something that works "independent of the current editor theme" is about our defaults, and the numbers back you up. In the Modern (light) theme:
active tab
inactive tab
difference
Modern (light)
rgb(244, 248, 249)
rgb(236, 237, 238)
~8 per channel
Modern (dark)
rgb(78, 92, 104)
rgb(57, 67, 75)
~21-29 per channel
So it's specifically the light themes that are too subtle — about a 3% difference — while the dark variants are already reasonably distinct. That's worth changing in the product rather than leaving to themes, and it's a small change. I'll leave this issue open to track it.
OK: For the record, for anyone who wants to jump into the bowels of RStudio themes---
I tried this, asking Claude to read @gtritchie 's reply and DO IT! Here's the transcript
? Braces balance and the header is well-formed. The file is in the same folder as the user's other custom .rstheme files, so RStudio should
pick it up automatically. This is a local RStudio config change, not something I can test by launching RStudio myself — here's how to use it.
What I did
Created textmate-tab-accent.rstheme in %APPDATA%\RStudio\themes\ — a copy of your current active editor theme ("Textmate (default)") with the tab-contrast CSS from that comment appended: a blue inset accent bar + bold label on the active tab, plus the optional white background fill scoped to .rstudio-themes-default (the Modern light global theme, which is what your config already uses).
How to use it
Restart RStudio (or just reopen Global Options if it's already running).
Tools ? Global Options ? Appearance. Under "Editor theme," you should see "Textmate + Tab Accent" in the list alongside your other
installed themes (Solarized, One Dark, etc.) — no need to browse/import, since it's already in the themes folder RStudio scans.
Select it and click OK. The active tab (Source pane, and also Console/Environment/Files-etc. panes, per the commenter's caveat) should now show a blue top bar and bold label instead of the current subtle Textmate-light contrast.
If you decide you don't like it, just switch back to "Textmate (default)" (or any other theme) the same way — nothing else on your system was touched.
One thing to flag: the commenter noted there's currently no way to scope this to just the editor tab strip — it'll restyle the
Console/Terminal and other pane tab groups too. If that turns out to be too much, we can drop the accent-bar rule to something narrower, but there's no CSS hook yet to separate them (that's the "unseparable" caveat from the issue).
Now my Editor pane looks like this:
At least I've got bold and an overline.
From a UI design view, what would work best is coloring the background of tabs--- perhaps by file type and making the active tab bold in color. That's what I get in Powershell work work on different r projects
Yeah, I think a code-based solution would be best here (versus requiring a bunch-o-themes being updated). I'll put it in our next milestone and see what I can do.
Thanks! Here's a quick screenshot of how things look -- we include a small blue accent bar on the left side of the active tab. Is this sufficient, or do you prefer the overline treatment?
Thanks for asking....
The overline is much more visible, as you can see below. The fix that @gtritchie suggested works well enough for me, but I had to get Claude to install it.
I'm using that with a TextMate theme, promoted to TextMate+Tab accent.
IMHO, all themes should get this tab accent treatment, as long as the stripe color stands out against the background.
Activity
gtritchie commentedon Aug 31, 2026
Thanks for the detailed report — I dug into how tab styling actually works, and the answer splits into two parts: there is already a supported hook for this that a theme can use today, but the default contrast you're seeing is a genuine problem on our side.
The hook exists — themes can do this today
RStudio deliberately exposes a set of stable (non-obfuscated) CSS class names for exactly this kind of customization. From
themeStyles.css:An
.rsthemefile's CSS is applied to the whole IDE, not just the editor text area, and it's injected after our own stylesheet — so a theme can restyle the tab strip.You can get the exact treatment you're describing (accent bar + bold label) by adding this to the end of your
.rsthemefile:box-shadow ... insetis preferable toborder-topbecause it doesn't shift the tab's layout.This isn't theoretical —
gadenbuie/rsthemesalready ships this. For examplenight-owl.rsthemecontains a 4px blue inset accent bar plus afont-weight: 600label on the selected tab. So the mechanism works.Why switching themes didn't help you: coverage, not capability. None of the 34 themes bundled with RStudio contain any tab-strip rules, and our
tmTheme→.rsthemeconverter never generates them — it only emits editor/terminal rules. In third-party theme collections it's opt-in per theme, so most themes you tried simply had nothing to say about the tab strip.One caveat: there is currently no stable class name that distinguishes the editor tab strip from the pane tab strips, so rules like the above will also restyle the Console/Terminal, Environment/History and Files/Plots/Packages tabs. Many people consider that a feature, but it isn't separable right now.
The default contrast is a fair complaint
Your request for something that works "independent of the current editor theme" is about our defaults, and the numbers back you up. In the Modern (light) theme:
rgb(244, 248, 249)rgb(236, 237, 238)rgb(78, 92, 104)rgb(57, 67, 75)So it's specifically the light themes that are too subtle — about a 3% difference — while the dark variants are already reasonably distinct. That's worth changing in the product rather than leaving to themes, and it's a small change. I'll leave this issue open to track it.
friendly commentedon Sep 1, 2026
Thanks for the detailed analysis. I'll give this a whirl
But my often tired eyes will thank you if this can be new feature in RStudio
Hey, man: Active Windows would like some respect!
friendly commentedon Sep 1, 2026
OK: For the record, for anyone who wants to jump into the bowels of RStudio themes---
I tried this, asking Claude to read @gtritchie 's reply and DO IT! Here's the transcript
Now my Editor pane looks like this:
At least I've got bold and an overline.
From a UI design view, what would work best is coloring the background of tabs--- perhaps by file type and making the active tab bold in color. That's what I get in Powershell work work on different r projects
gtritchie commentedon Sep 1, 2026
Yeah, I think a code-based solution would be best here (versus requiring a bunch-o-themes being updated). I'll put it in our next milestone and see what I can do.
friendly commentedon Sep 1, 2026
And, I don't mind the look at all in other panes:
Tagging: @gadenbuie on this
gtritchie commentedon Sep 1, 2026
I like that too, my terrible eyesight has a hard time spotting which tab is selected in general.
friendly commentedon Sep 9, 2026
Thanks for your work on this!
kevinushey commentedon Sep 9, 2026
Thanks! Here's a quick screenshot of how things look -- we include a small blue accent bar on the left side of the active tab. Is this sufficient, or do you prefer the overline treatment?
friendly commentedon Sep 9, 2026
Thanks for asking....
The overline is much more visible, as you can see below. The fix that @gtritchie suggested works well enough for me, but I had to get Claude to install it.
I'm using that with a TextMate theme, promoted to TextMate+Tab accent.
IMHO, all themes should get this tab accent treatment, as long as the stripe color stands out against the background.
highlight only the active document tab, including its top border (#18753
kevinushey commentedon Sep 23, 2026
Thanks! The overline treatment you suggested is in the latest daily builds, and will become part of the next release (hopefully early to mid October).