-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot distinguish different files with the same path.filename(x) #8499
Comments
I had both the user settings and the workspace settings ... |
As originally designed, we did something very similar: whenever something is opened that is not in the root of the folder, then we show it's parent folder below the file name in smaller text. Some things to note... If we want to go with this approach, then we need to use something other than the italic font (this was before we decided to use italic font on preview tabs). What we could do is a less pronounced color. Combined with the smaller font size, I think that may work. I can work on some variations of this if we go down this route. |
If we showed the path to the file in the status bar would this resolve this issue? Is there enough horizontal and vertical space in the tab to be able to show the path to the file? |
We should talk about this when I am back from vacation, a user posted a PR that does the simple thing: Just add the path of the file to the tab if another tab has the same name. |
What about showing the path to the file in the window title like ST does? Often I would like to see the full path (for various reasons) even when I don't have multiple files by the same name open. (Since this is a slightly different issue, I can open a separate issue report if that seems more appropriate.) |
@bpasero If the request to use the search feature was directed at me, I did that already and didn't find anything... My question was whether the idea merits a separate issue (since it's one potential solution to this issue), not whether an issue has already been opened for it. |
I would personally vote for something similar to what Sublime is doing. It is smart about it and if the parent folders have the same name it prepends their parent names and so on. |
@ligaz yes I like that too. @ecraig12345 #1723 (you owe me 2 minutes of my morning) |
Also related: #3119 |
I think this needs some design work first. Assign to me once we made a decision please. I am not sure we plan this for August. |
Will discuss again tomorrow. I forgot to add notes from our discussion last week. We agreed that we should show the name of the parent folder whenever there are two files opened with the same name. |
This is especially needed when working on Ansible scripts: I have a whole folder tree full of files with names like |
@stevencl @bgashler1 I pushed this with some changes to our initial discussions. First of all this is how it looks: For one, I decided to use the same UI for showing the path that we already have when disabling tabs: That is, smaller font, some margin and a different color so that the file name is still standing out strong. And then I am always showing the full path of the file and not just its parent for several reasons:
|
Is there a reason to show the full path instead of just the difference as Sublime does it? Showing the full path will widen the tab which might be good for users with 13' displays. |
I had a longer discussion with @stevencl on this and maybe we can discuss it here so that more people can chime in. If we decide to only show the parent name of the folder, things are maybe OK and expected, but what happens if the parent names are also identical? You start going up one level so you might have a description of "foo/bar" and "some/bar" next to the file name. Would that not draw the impression that the file is within a folder "foo/bar"? I think to solve that confusion, at the very minimum we should show the last portion of the folder with a leading "../" so that people understand, the folder is not the absolute path to the file. |
@bpasero -- personally I'd be down with that. My goal is to be able to distinguish identically-named files from each other in as little space as is required to do it. If I open Also, I think this is similar to #8501 (just so they get linked up) |
I pushed a change to show the name of the folder to distinguish tabs with the same file name but I am falling back to showing the full path as soon as the parent folder is also identical. I think that is a good solution. @stevencl fyi, this solution is closer to what you suggested in the first place. |
@jhofker yeah, nice finding, and I saw this today this morning and pushed a fix after our nightly was already running. The really only situation you should ever see a full path (that is: workspace relative if the file is from an opened folder) in a tab is when both files have the same parent folder. But that seems to be happening in ST as well: |
@bpasero just updated to last night's build and this is working great. Thank you! |
+1 for a setting to force this always on, but for a different use-case than @steve-ross. Working in a project that has many of the same filenames (e.g. Ember, where filenames are relatively semantic, or many NodeJS apps where |
@peabnuts123 same use case :) as in my screen shot (react / redux app) maybe that approach makes more sense. Guess we should really dig in and see if we could contribute. Special thanks to all you open source contributors. Don't let our "complaints" & feature requests diminish the fact that you all kick ass for bringing us tools. |
+1 i am working on a react/redux app and would love an always on option as @steve-ross mentioned. |
Another +1 for exactly the same reasons as @orangemooncreative @steve-ross ... And another +1 for 'it's a great tool'! I'm not github-by enough to know whether we should / can file this as a feature request? |
Testing #7854
The text was updated successfully, but these errors were encountered: