A simple package for the Atom text editor from GitHub that allows you to pin tabs. Inspired by the pin tab feature from Browsers, also supports Visual Studio style pinning.
For the best experience of this package, I recommend using it with the file-icons package.
There are three ways to pin/unpin a tab using this package.
- Via the context menu of a tab.
- Via the keyboard shortcut ctrl + alt + p.
- Via the command-palette, by typing
Pin Active
.
Via the Atom Package Manager (APM)
$ apm install pinned-tabs
Or via Git clone
$ cd ~/.atom/packages
$ git clone https://github.com/ericcornelissen/pinned-tabs-for-atom --depth=1
You can add custom styles for pinned tabs. Use your Stylesheet and target .tab.pinned-tab
to tweak a pinned tab. You can consult the package stylesheet to see what classes are used.
Below are a few examples of ways to customize the styling of pinned tabs.
.tab.pinned-tab.active {
background-color: salmon;
}
/* Or all non active pinned tabs */
.tab.pinned-tab:not(.active) {
background-color: olive;
}
.tab.pinned-tab > .title::before {
content: '\f135';
font-family: FontAwesome;
font-size: 18px;
}
If you're using file-icons, you can check out its customization documentation as well.
.tab > .pin-icon::before {
content: '\f015' !important;
}
.tab.pinned-tab > .close-icon::before {
content: '\f276';
font-family: FontAwesome;
font-size: 12px;
}
.tab:not(.pinned-tab):not([data-type="TreeView"]):not([data-type="PanelDock"]):not([data-type="Object"]) {
opacity: 0.5;
}
Where the different :not([data-type])
exclude tabs elsewhere in Atom.
Copyright © Eric Cornelissen | MIT license