Last active
September 24, 2021 08:06
-
-
Save dhbradshaw/fcd67df6564eae64a0a5 to your computer and use it in GitHub Desktop.
Customize tab titles in atom text editor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place this snippet into init.coffee in ~/.atom directory | |
atom.workspace.observeTextEditors (editor) -> | |
if editor.getTitle() isnt "untitled" | |
sp = editor.getPath().split('/') | |
title = sp.slice(sp.length-2).join('/') | |
editor.getTitle = -> title | |
editor.getLongTitle = -> title | |
for item in atom.workspace.getPaneItems() | |
if item.emitter? | |
item.emitter.emit "did-change-title", item.getTitle() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please note if anyone needs it just because of multiple 'index.…' tabs, a CSS solution is possible too
[in Atom -> Stylesheet add:]
.tab-bar .tab .title[data-name^="index"] {
letter-spacing: -1px;
direction: rtl;
text-align: left;
}