My Visual Studio extension, is arranging Tab Sizes using ITextParagraphPropertiesFactoryService interface. That class is doing a great job, and helps me to set tab widths for all existing lines, but I have a problem to set tab sizes for new virtual line.
In other words, Visual Studio is setting caret position in VirtualSnapshotPoint, and converting it to real tabs only when user enters some symbols.
Now, Is it possible to force Visual Studio to create real tabs instead of virtual spaces? I try to create edit on view, and insert real '\t' symbols, but VS still converts it back to virtual... This happen for both, block and smart indent tab settings
So the behavior of blank lines being virtual space only is by design, and as best I know not changeable. If there's a specific problem with it, please update the question and we can go from there.
Related
I have some old source code which uses tabs as white space (\t), and some newer code after we changed our source code convention which uses 4 spaces instead. Those two look the same on Windows just fine, but on Linux in Vim a tab is 8 spaces, so new code with 4 spaces and old code with 8 spaces looks all funky.
I tried to untabify the source files, and check them in, but the TFS update just completely ignores those, and I get nothing changed when checking in. How can I check in the change from Tab to 4 spaces?
This may due to your Visual Studio side setting and thus the changes could not be display.
For the mixed tabs and spaces , try to change your visual studio text editor setting. You can decide if you want visual studio to insert spaces or tabs here:
Tools/Options/ -> Text Editor/All Languages/Tabs, select the "Keep Tabs" option.
After setting this, the tab will changed as → instead of -like space.
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
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.
I've set up Visual Studio 2008, exactly as I want it with one screen (got dual monitors) used only for coding and the other setup with multiple tab groups, each containing different tabs, like one group contains the output, error list and todo list tabs, another group has tabs for the toolbox and properties windows.
Now this is all cool and everything, except when if I debug something and I'm done debugging it throws all the tabs together into one group and screws up all my nicely separate tab groups.
Anyone know of anything that will stop Visual Studio from doing this and remember which tabs goes into what groups?
This is because VS has separate layout settings for coding and debugging. The idea being that when coding you don't want things like the output window etc, you want solution explorer and a nice large code window. When debugging, you still want to see code, but also possibly lots of other windows to help you (threads, breakpoints etc).
In fact I believe there are lots of window layouts available (in additional to your own customisation). This is one of the things Visual Studio asks you when you first start it up and are setting up your environment.
The only way I know to resolve this is to also re-arrange your windows "while" debugging. It should remember those settings and switch to them when you are debugging.