Jun 12, 2015

Right Align Atom's Preview Tab

Atom's built-in tabs package now supports a preview tab. This means a file you open with a single click in the tree view will be replaced by the next file you open in the same manner. If you start to edit the file or open it with a double click instead, it will turn into a permanent tab and won't be replaced by the next preview. You can enable this behavior in the settings of the tabs package.

I was already familiar with this setup with Visual Studio. But in VS, the preview tab is always on the right side, clearly separated from the others. Atom lacks the setting for that, but you can add it yourself by adding the following to your custom styles:

.tab-bar::before {
  order: 998;
  flex: 1;
  width: 100%;
  content: "";

.preview-tab {
  order: 999;

It's that simple. Now go write some code!

Comments powered by Disqus