-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Allow to configure title bar information #1723
Comments
@bpasero By assigning this to yourself, does that mean it might happen? If so, please let me know if you would like some help, even if it's just for feedback. |
This issue is currently assigned to the backlog. Every sprint we pick items from the backlog to plan for the current iteration. Please see https://github.com/Microsoft/vscode/wiki/Issue-Tracking#planning |
+1. The more I use VS Code on bigger projects, it's becoming frustrating to be unable to distinguish between open windows. I wish I could configure the title to just show [Root Folder] - [File], since it's hard to distinguish between open projects when the file name is shown first. But some simple templating system would probably solve everyone's problem. |
#12625 for the issue to show the full path in the title bar. This might resolve many (but not all) concerns of this issue. |
@bpasero i do appreciate the effort but actually this still does not address the issue (at least as far as Windows) is concerned. It may actually make it worse (though since it's an option that's not an issue). The problem is that in Windows, the taskbar shows a preview of all windows for a given application, and there is only limited space to show the title. Showing the full path would give me exactly the opposite problem I have now: I'd just see the part of the path, starting with the root, that fits in the display. So with this enabled, I'd most likely have no information at all about which window was which, since they likely all share a common root path. What is really needed is the ability to show In the example below the only one I can tell which project is open is |
@jamietre we can still tweak this experience and I welcome the problem description you gave, though I am not sure how to best solve it. Here is how your scenario looks like without the new option enabled: And here with the option turned on: This makes it hard to see the currently opened file but you can easily see the full path when you compare the 2 window titles in full (not from this experience). I think this feature request is still valid for that particular scenario because you could then really compose the title you want, I am not sure we should change the experience by default with the new option. I am open for suggestions though if the default experience when this new option is turned on should be changed. |
Thanks for all the feedback, it's very appreciated. In my case almost all my code is under a single heirarchy like The perfect world for me would be the ability to pass a template like Even more perfect world, the ability to invoke a javascript function that I wrote to return my title given the path as input :) but then I've written a plugin haven't I.. |
@jamietre but how is root folder solving it when you have 2 workspaces with the same name in different hierarchies? "{rootFolder} - {fileName}" isn't that what we are showing today without the full path option enabled? |
I wasn't considering that possibility - I would never have two workspaces with the same name open (or at least, it's not particularly likely, maybe if I was trying to deep dive some comparison between two branches?). But that's not my problem generally... if that is an issue for some people, perhaps a possible solution is to also display a numerical index identifying which was opened first? Can VS code instances know anything about each other? But anyway -- right now the problem is the root folder appears last, e.g. |
Oh yeah, that is true. I was not thinking about the fact that the file name comes first. We cannot change that without making it hard for users that want to quickly glance at the file name in that scenario so I guess no matter what it boils down to making it configurable if any. I still think the setting to show a full path is a good one, so I will keep it as is for now and we leave this one here open. |
I would really love to hve an option/config to at least show {rootFolder} first. event if its just that (don't really see the point of having the filename in the title bar. For me the next most useful information would be the git branch name: "{rootFolder} - {branchName}" |
@Cedric-Venet agreed. If VS Code allowed you to drag a file out to start a new window, I could see how that might be useful to some. But you can't -- so it just doesn't seem likely that's what many people are looking for a file name when trying to discriminate between open instances. I looked at the code that creates the window title in |
@jamietre Dunno if this exactly deals with one of your use cases, but there's a plugin called "Open Folder Context Menus for VS Code" that "Quickly opens a new instance of VS Code from the Explorer". Works pretty well for me. |
@alexdresko the problem isn't opening VSCode, it's finding the correct instance among a bunch of already opened ones. |
I often have multiple windows of VSCode open. Until I found this issue I'd had a different thought on how to solve it: setting a workspace/folder colour. I commonly have one window using the integrated debugging feature for a backend written in NodeJs. The bottom bar goes orange when debugging, and I've been using that help distinguish which is which. You can see this in a picture already posted in this thread: I tend to switch between full-screen windows using the keyboard, rather than hovering on the taskbar to select a window. But even when flicking between full-screen windows, it's not always clear where you've switched to. And while being able to customise the title of the window would give me somewhere to glance at, I think that colourising some part of the window would allow for even quicker discerning of which instance has been focused. Although the title of this issue is "Allow to configure title bar information" I figured that my suggestion probably belonged here at first rather than in it's own issue, since the other comments here have equated this issue to "Allow to configure easy distinction between open windows". But I can create a new issue if others agree with my suggestion but don't want to lump the two together. |
+1. I frequently work on multiple sub-projects of a large project at the same time. {filename} - {root folder} doesn't help because, for other reasons, all of my root folders are 'src' in VSCode for each of my projects. |
The ability to configure the window title to show This seems to be a rather trivial configuration option to implement, but it adds tremendous usability value. |
I settled on the following solution: there is a new setting Variables are declared using
Default values on the various OS: macOS: Linux/Windows: Since the original request asks also to see the git branch information in the title, I extracted #20016 to follow up. |
Is this in the latest insiders build? |
@alexdresko it will be tomorrow. I did a slight update to let the variables be Happy for everyones feedback once this is out. |
w00t! THANK YOU!! I am 99.5% happy with this. The last .5% is that (of course) it would be nice to be able to use a Javascript function that gets called with these arguments, instead of just a string template, so i could do fancy things like include the last 2 segments of the path... handle certain types of things differently (e.g. modules vs. apps), etc. But this is definitely just being greedy, and probably everyone has better things to do now. :) This absolutely solves the problem for me, I can figure out at a glance which window I'm looking for. Best Tuesday ever! |
Yeah, I can see how a scripted solution would be better, but let's see how far we get with this approach for now. |
It would be a more universal solution to this kind of thing, generally, but I assume it involves some kind of infrastructure change or new convention, since config is Really just threw that out there for long-term consideration. I'm very happy with the way this is working. |
Actually I wonder if
Why not just automatically add a separator if there is |
You might not always want it, e.g. |
Hm yeah 💩 |
Thanks, I've been waiting for this for long time.
Small changes sometime make a big difference :)
…On Tue, Feb 7, 2017 at 7:16 PM, Benjamin Pasero ***@***.***> wrote:
Hm yeah 💩
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1723 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARwKKPmdVfRcuBt8wcpa48vJriFMafleks5raKcEgaJpZM4G9Nhu>
.
|
I really like it. Thank you for this update. You might want to think about allowing people to add parsing logic (too much?) In my case, our code is laid out like: /path/to/project/[Branch Name] So, using {rootPath} is nice, but I'd like to trim "[Branch Name]" off most of the time. It might be a bit much to support this though |
UPDATE: Ignore this - not a problemThis doesn't seem to be working for me. I'm not seeing the file name first.. just seeing "C:\Path\To\Project - Visual Studio Code - Insiders"
I restarted the app and opened various files. Also, does it require a restart to work? Kind of hard to test what you're doing that way |
Pro tip: You won't see the setting changes when editing the settings file. You have to switch to another file in your workspace to see the changes you've made in the settings. Not sure why that is exactly. And it does not require a restart. |
Huh.. I think it's actually updating, but taking a LONG time to do so on this machine. So, I think my problem with the title bar is not a problem. |
Hmm.. now we just need this feature for the "recent window" list, which just shows the folder name for me, which isn't specific enough (lots of "main" listed in there) |
Small update, I added |
Another update after feedback from testing during this week from the team: I decided to revisit the variables around file paths and change them because things are getting complicated when an editor is not showing a file. Here is my new solution:
If there is no long editor label, the medium one will be used. And the same is true for medium and short. Basically:
I hope this works for everyone, should be available in today's insider build. |
@bpasero is there a way to remove the Looks like |
No, we strongly advice against using extensions that modify our bits so it is in the best interest to show this not only to you as a user but also to us when we have to investigate bugs which are caused by extensions that patch our bits. |
@bpasero I'd love to see the last directory name as a prefix to the filename on all tabs. Vim tabs are very smart about tab names btw. |
Yeah this was reported already as feature request. |
I made a quick extension for setting the title for the workspace: https://marketplace.visualstudio.com/items?itemName=nilpatel.title Those who find this thread may find it useful. |
@nileshp87 works great, thank you! |
It would be great if we could configure the information that gets displayed in the title bar. I use ManicTime a lot, and it's hard to auto tag my activities when the title bar basically only displays the file name and root folder name. Having the full path to the file and the git branch name would be super helpful.
For some other ideas, this VS plugin is super rad and affords complete control over what gets displayed in the title bar. https://visualstudiogallery.msdn.microsoft.com/2e8ebfe4-023f-4c4d-9b7a-d05bbc5cb239
The text was updated successfully, but these errors were encountered: