Tab name behaviour in different panes


#1

Hi,

When opening files with the same name, like 2x test.txt, atom shows their parent folder in the tab’s name:
test.txt - parentfolder1
test.txt - parentfolder2

However, when I use two panes and put one file in each pane, this behaviour disappears and I am left with the exact same tab name twice:
test.txt
test.txt

and I have to hover over the tab to see which one is which.

Is there any way to disable this and have Atom recognize duplicate file names across panes, instead of just within panes?


#2

There’s no setting for that as far as I know but this package looks like it’ll do what you want?

It seems to show the parent directory for all tabs though rather than only duplicate tabs with duplicate file names.


#3

I’ll have a look at that, thanks.

Though it does seem like that makes it more clogged. Would be great if I could just toggle an option somewhere. Especially since Atom is ‘hackable’.


#4

What part of “hackable” implies every possible little thing has a setting to toggle? The way I see it, hackable implies the opposite, placing the task on the user to implement what they want.

Of course, people are nice, so they make community packages (like the one @rsese linked to) for things they think others might like as well. There are also people here on the forums ready to give guidance or otherwise as necessary.


#5

Well clearly something in Atom changes the naming behaviour when switching tabs to another pane. I don’t imply hackable implies that there is an option for everything, but it does mean everything can be changed. Whether that is through an option or through removing/adding a line of code is just the same to me.


#6

Here’s how Atom is hackable: the tabs you see aren’t part of the core functionality. They’re generated by the tabs package. You, I, or anyone else could easily pop open a terminal window and git clone https://github.com/atom/tabs, go inside, run apm link and atom ., make changes to the package, and then reload Atom. apm link creates a fake folder in .atom/packages/ that points to your code folder, and the core package won’t load if there’s a community package with the same name.

I can tell you that this is the file that would need to be edited. Here’s the difficulty: tabs operates separately within each pane and dock. If you want it to be able to know all files that are open, you have to check each Pane and keep track of all the results in order to tell tabs what to render. This would not be a difficult coding task, and would be a great exercise if you’re learning.


#7

Very helpful, thanks. This is what I was looking for!