I'm looking to be able to set the minimum tab size to something lower than the default 20 width, since I'm editing more than 5 files at the same time. I'm using the Productivity Power Tools extension as well.
You can right click on the space beside the tabs, click Customize...
and then Advanced Options then edit the value from there, but it doesn't allow you to go below the inital size of 20.
Is there a configuration file somewhere I can edit to solve this, or is there an obvious solution that I'm missing?
The solution actually was the maximum size rather than the minimum size. So just tweaking the maximum size value was what I wanted. Not ideal, but still, the answer.
It's worth noting that the screenshot you've posted shows non-standard VS settings - that's the Productivity Power Tools extension that you have installed. You might find they hide their setting file separately to the standard VS one.
One alternative solution is provided by that extension: it'll allow you to have a vertical row of tabs, down the side of your screen. That eats more screen space but fits a lot more tabs!
As per MSDN:-
Your active settings consist of two parts: predefined customizations
from the installed .vssettings file you selected the first time you
started Visual Studio and any subsequent IDE customizations you have
made. Active settings are saved by default in the file
currentsettings.vssettings.
So its better editing the values at %USERPROFILE%\Documents\Visual Studio 2010\Settings\CurrentSettings.vssettings (This is mine,you need to set it as per your choice.)
However there is one more file, you can edit i.e. C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Profiles\General.vssettings but keep in mind that editing this one can be quite destructive and its better make a backup copy of it. Also for more information you can ask this at social.msdn.com.
Related
I would like to increase the space between the lines of code in visual studio (to help me get less distracted while reading the code). I know this is possible in IntelliJ/Rider (see this post). Is there a similar setting or option in VS?
I have searched and the only option I can find is to make the space between the lines smaller using the PPT extension.
Another option that I read somewhere (but can't find anymore) was to create a custom font with taller characters.
If you're on VS 2015/2017/2019 (this extension doesn't support VS 2022), you can use the LinePress extension available on the VS Marketplace.
Setting it up is really easy, after installing it, go to the Tools menu > Options > LinePress, you can set there the line height at your liking. (You can also set up the height of empty lines and compress lines with specific contents.)
BONUS: Support for VS 2022
There's an integrated option into the Settings, just go to Tools > Options > Text Editor > General and on the right pane find the option Line spacing, and set its value to one of your liking.
Document tabs in Visual Studio are sized to the name of the file as it appears on the tab. This means that the size of each tab that is open is contingent on the size of the text of the file name.
Is there a setting buried somewhere that will allow me to keep all tabs the exact same width?
Why does this matter?
For those that must know a reason for this request, I often work in sizable projects which someone else originally created. While researching functionality of code, I'll often open up over 10 documents, tracing paths or researching behavior. When I'm finished with my research, I'll often have to close the previous 3-7 tabs to get back to my original document and unclutter my work area.
I know this seems like a minor nuisance but since every file name is different, you can't keep your mouse in one location and click the the left-button 3-7 times in rapid succession to close all pertinent documents. You have to float the mouse back and forth, for every tab, because of the variance in tab size.
I'd prefer to just set it so that all tabs are the same size, regardless of the length of the file name. Can this be done with reasonable effort?
I am using Visual Studio 2015, so I would like an answer for that version of VS. However, once I upgrade to VS 2017, I'd like to make the same change to that environment.
If the answer for either version is different, I would prefer an answer for both instances of VS.
You can try Productivity Power Tools.
The feature "Vertical tabs" is what you need.
Document tabs are shown vertically, allowing you to fit more tabs than are normally visible when shown horizontally.
For VS 2015 https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerTools2015
For VS 2017 https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerPack2017
Updated:
Productivity Power Tools also support customizing min/max tab width. You can find it from Tools>Options...>Productivity Power Tools>Custom Document Well>Advanced
In VS2022 this is built in under Tools-> Environment -> Tabs and Windows
As seen on the screenshot below, marked by red arrows:
If I use Vertical Tab Split subwindow, I lose the ability to split insert another tab and split it horizontally. Is there any addon or setting I can change to be able to put my code tabs in sort of rectangle-grid?
Just to clarify - I don't want to see the same file contents twice. I want every tab to show a different file. I can't find the reason why such an oversimplification to ide was introduced.
I know it can be solved by opening many standalone windows, but that's hardly an answer for me.
Here's the example of how it looks like in Sublime 2
As you have discovered it's not a feature of the VS shell. For reference, it wasn't possible in VS2010 either.
You can vote for this feature on the Visual Studio Developer Community site - there's a specific request for it here
In VS 2010, after I would close my solution, and then re-open it the next day, all the documents that I had open, would still be open. Just what I wanted.
After installing SP1, every time I open my solution, all my documents are closed, no matter what state I left them in.
Is this expected behavior, a bug, or is there a setting I don't know about? How can I get my documents back?
EDIT 29-Mar
Re-installing VS2010 and SP1 did not resolve this issue.
Building on top of SteveBob's answer, just do a Window -> Reset Window Layout
This should fix the tab problem. There is of course the side-effect that you'll have to redo/re-add all the windows ( output, solution explorer, properties, find, watches, immediate, etc)
Backup your settings then do a devenv.exe /resetsettings.
It appears that there is not an adjustable setting that controls whether or not the open documents are remembered. By default, Visual Studio stores this data and then re-opens the documents that were open the last time the project/solution was closed. As pointed out by some links referenced by Stuart Dunkeld, it takes a Macro in Visual Studio to override this default behavior.
My problem appears to be that my 'Settings' had become bloated/corrupt. Based on the suggestion of Luke, I exported my settings, then did a reset. This restored the default 'Remember Open Documents' behavior. Then after much fooling around, I was able to import (almost) all of my old settings and still not mess up the proper document behavior.
When importing my settings, I selected everything except the 'Window Layouts' settings.
This restored my existing settings, while keeping the default Visual Studio behavior of remembering which documents were open.
I then re-exported my (fixed) settings so that I had a backup. That's when I noticed that my old, possibly corrupt exported settings file was 8.6MB, while my new, correct exported settings file was only 0.2MB.
After examining some of the differences between these two settings files, some of the information leads me to believe that the installation of VS2010 SP1 had a conflict with the 'Document Well 2010 Plus' feature in the Productivity Power Tools extension, but I cannot positively verify this.
Does it work OK with a new solution? If so, you could try trashing the .suo file attached to your solution.
I keep a lot of files open. Every so often, my VS2012 stops restoring the open files. Opening them again does not help the restore process.
I tried:
All the above suggestions, and all the suggestions I could find elsewhere
In particular: deleting .suo, .filters, .sdf, .opensdf, etc
Plus /resetlayout
Plus /resetsettings(ouch)
And none work for me. Or, at least not reliably.
But I just tried:
Install Productivity Power Tools
Enable Options / Productivity Power Tools / All Extensions / Custom Document Well
Restart Visual Studio
(the PPTools document well saves and restores properly!)
Disable Options / Productivity Power Tools / All Extensions / Custom Document Well
Restart Visual Studio
And now the builtin document well has resumed saving and restoring properly as well! At least for the moment.
I'm guessing that the builtin "document well" was derived from the one in PPTools, possibly causing the side effect of turning the PPTools on and off.
(I could simply use the PPTools document well all the time. But I can't get the colors therein to work to my satisfaction.)
Hope this helps someone.
Have you tried deleting the .suo file? It may have become corrupted.
I have a certain project that's been problematic in visual studio. The main form has a TabControl with four tab pages, and during initial development, the entire contents of the third tab page would shift down each time the project was opened. (It got really bad if you didn't look at that page for a few days, and the next time you ran the program, you had to scroll down past all the blank space that had built up before getting to any content.) That was relatively easy to work around by selecting everything and dragging it back up to the top.
Since the project has gone into maintenance/enhancement mode, the third tab page hasn't had any problems, but several controls on the fourth tab page are being re-sized (a small increase in width) or shifted left (a large decrease in X-position). Again, these same controls are affected each time the project is opened, so if you don't fix them each time, they'll continue to get further away from their correct settings.
The problem description is a lot like this other question; one notable difference is that the designer source file is not changed, i.e., I can open the designer source file in a separate text editor and see the correct values for location and position of all the affected controls, while at the same time I have the project open in Visual Studio and see the incorrect values in the Properties window. (Doing a "Save" or "Save All" doesn't affect the designer source file after just opening the project, but changing anything on the form and then saving it will make the source file match the incorrect values from Visual Studio.)
Any ideas about why Visual Studio is displaying the form incorrectly? I'd really like to avoid having to spend the extra time to fix it every day. And I'm not keen on adding code to the constructor to re-set those properties, as suggested elsewhere (violation of SPOT/DRY rule, you know--fraught with peril).
You can compare the Designer.vb file of the problem form from one version to the next. (Click Show All Files in Solution Explorer). That should tell you what is being changed and maybe you can find a workaround.
I've had similar problems that were resolved by uninstalling and reinstalling Visual Studio.
I finally found a way to get around this. When I set the affected form's Minimum Size property in the designer to something other than 0,0 (such as the current size of the form) some of the controls relocate themselves the next time I open the form. Setting Minimum Size back to 0,0 resolves it. The affected controls either have no Anchor setting or have Anchor set to Bottom.
So its seems the combination of Anchor Bottom and non-zero Minimum Size is what makes this unwanted movement happen.