Compatible with all products except MPS
16 219

Awesome replacement for IDEA's 'Show directory in editor tabs for non-unique filenames'. If you have same named files in different directories this plugin will allow you to have directory names added to tab labels. It only shows path differences so if you have "blog/controllers/index" and "news/controllers/index" it will add either [blog] or [news]. In setting tab 'Tabdir' you can control how prefixes will be formatted.

Per-project configuration allow specify different formatting rules for each directory in project. To enable per-project configuration enable "Use per project configuration" checkbox(see screenshot №3) and reopen settings window(need close with Ok or Apply buttons). After this you will find 'Tabdir' configuration in project section(screenshot №4) in which different configurations can be specified.

Note: that you should turn off IDE Settings → Editor tabs → Show directory in editor tabs for non-unique filenames.

Download plugin

Recent change notes

  • 1.1 Add possibility to configure tab title format.
  • 1.2 Fixed NPE for files with no path(in memory).
  • 1.3 Add possibility to configure per project format for directories.
  • 1.3.1 Share plugin to all IntelliJ Platform products.
  • 1.4 Fixed NPE(was in phpstorm), update description.
  • 1.5 Tabdir-4 issue fixed, copyright updated
  • 1.6 Tabdir-9, Tabdir-10, Tabdir-11 issues fixed
  • 1.6.1 Fix for IDEA 12
  • 1.6.2 IDEA 12(EAP) release only: fixed Tabdir-15
  • 1.6.3 Rebuild in java1.6
  • 1.6.4 fixed Tabdir-16

General usage instructions

1. Install 2. Configure name reducing and processed file extensions 3. Open file with non-unique(in project) short name and see editor tab label Plugin create prefix of differences in pathes of opened files with non-unique names
@Kipriz Thank you - I'm proud to hear this. Unfortunately I don't think that JB will include this plugin into default distribution, because most of features are not general purpose I think.
It should be bundled with all Jetbrains product (including Idea 11 and 12).
Thanks, please make an issue in github for this functionality. Right now I have some problems with free time - so can't say anything about when it will be implemented.
Works great in PHP storm 5, great addition. I agree with dannybloe; it would be nice to have an option that a tab name is always unique, even it is 5 levels higher. Thanks
Mmm.. sorry for the formatting in my previous command. It gets messed up here. Hopefully you can stil figure out what I mean.
Hi, thanks for the plugin. I was wondering... I'd love to have an option that adds so many parent folders to the name just enough to make the tabs unique. So, if I have these files open: src/modules/breadcrumbs/main.js src/modules/serviceOverview/main.js src/modules/serviceBrowser/main.js I want them like this in the tabs: breadcrumbs/main.js serviceOverview/main.js serviceBrowser/main.js I know you can set Max number of dirs but that is not the same. E.g. if I have these files open: src/modules/breadcrumbs/modules/main.js src/modules/serviceOverview/main.js src/modules/serviceBrowser/modules/main.js The tabs should be like this: breadcrumbs/modules/main.js serviceOverview/main.js serviceBrowser/modules/main.js So, as you can see, the first and the third show more parents otherwise you would get this (with number of dirs set to 1): modules/main.js serviceOverview/main.js modules/main.js Which makes the first and the third equal. Or is this already possible? Cheers, Danny
I love it in advance! And can't wait to see fixes and new features implemented.
First of all - it is great replacement for built in functionality. Thanks for your work! Secondly - still have some issues. It seems for me that per project functionality does not work in PHPStorm 5.0.3 on Windows 7 with Java 1.7.09. I defined some settings for a directory I open files from and it still uses global configuration. I have D:\Server\WWW directory opened in IDE and configuration defined for D:\Server\WWW\apps. Last, I would like to have an option to always display all subdirectories relative to project path in tab, not only for duplicates.
Tabdir doesnt work with Phpstorm 5. If i enable the plugin i cant open any files. I get an error message: org/apache/commons/collections/Predicate: org/apache/commons/collections/Predicate Details: org/apache/commons/collections/Predicate: org/apache/commons/collections/Predicate java.lang.NoClassDefFoundError: org/apache/commons/collections/Predicate at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.titleWithDiffs( at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.getEditorTabTitleInternal( at ru.crazycoder.plugins.tabdir.SameFilenameTitleProvider.getEditorTabTitle( at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer.calcTabTitle( at com.intellij.openapi.fileEditor.impl.EditorTabbedContainer.insertTab( at com.intellij.openapi.fileEditor.impl.EditorWindow.setEditor( at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4( at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl3( at com.intellij.openapi.fileEditor.impl.EditorsSplitters.a( at com.intellij.openapi.fileEditor.impl.EditorsSplitters.openFiles( at com.intellij.openapi.fileEditor.impl.OpenFilesActivity$ at com.intellij.openapi.fileEditor.impl.OpenFilesActivity.runActivity( at com.intellij.ide.startup.impl.StartupManagerImpl$ at com.intellij.ide.startup.impl.StartupManagerImpl.a( at com.intellij.ide.startup.impl.StartupManagerImpl.runPostStartupActivitiesFromExtensions( at com.intellij.openapi.project.impl.ProjectManagerImpl$ at com.intellij.openapi.progress.impl.ProgressManagerImpl$ at com.intellij.openapi.progress.impl.ProgressManagerImpl$ at com.intellij.openapi.progress.impl.ProgressManagerImpl$ at com.intellij.openapi.progress.impl.ProgressManagerImpl$ at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress( at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess( at com.intellij.openapi.application.impl.ApplicationImpl$8$ at com.intellij.openapi.application.impl.ApplicationImpl$ at java.util.concurrent.Executors$ at java.util.concurrent.FutureTask$Sync.innerRun( at at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( at java.util.concurrent.ThreadPoolExecutor$ at at com.intellij.openapi.application.impl.ApplicationImpl$1$ Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Predicate PluginClassLoader[ru.crazycoder.plugins.tabdir, 1.6] at at java.lang.ClassLoader.loadClass( ... 31 more
Very useful plugin. It helps me constantly in my work.
>>>Directories show anyhow (that 2, that 5, or for some files no dirs to show), If you have some problems or find a bug, PLEASE make issue in issue tracker and describe problem more precisely(provide some information of your environment). Do not post it here. >>>and if I need to show only 2-3 last (not first) directories no way for do this... This will be possible in next release, sorry I have problems with free time, so release is delayed.
I want this plug-in but it does not work :( Directories show anyhow (that 2, that 5, or for some files no dirs to show), and if I need to show only 2-3 last (not first) directories no way for do this...
@Yuvalik: thanks, nice to hear this. Unfortunately html styling is disabled in IntelliJ Platform editor tabs, so making some styling is not possible without reimplementing very huge part of IntelliJ code. Feel free to submit issue into Tabdir issue tracker and I will try to do something.
This plugin helps me a lot to keep me from messing up the wrong file. It is way better than the built in version. I have one idea that would make it even better (for me at least).
Would it be possible to give the directory a different color (e.g. grey). That way the contrast between file name and directory (location) is greater and results in faster recognition.
Thanks for feedback!
Functionality that you ask is present in latest version, but was broken from some build. I just reopened issue for this feature -
Will update plugin after issue fix.
Please  sign in  to leave a comment.