Does Visual Studio has tab-customization like in the Microsoft Words?
It is also useful for some dirty refactoring (e.g. block-editing).
With this feature, I don't have to space space space
/ tab tab tab
manually anymore to make it pretty like :-
In Microsoft Words, I can assign selected lines to have customized positions of tab :-
It works like this (->
are the tab characters):-
Code alignment extension recommend by a solution from VTT doesn't work for this code :-
std::vector<int> cat =std::vector<int>() ;
float zombie=5;
I expect it to be formatted like :-
std::vector<int> cat = std::vector<int>() ;
float zombie = 5;
But this is the result (at best):-
std::vector<int> cat =std::vector<int>() ;
float zombie =5;
Here is an example more similar to the real case:-
MyArray<ManagerAAC > packAAC =create (userData);
MyArray<ManagerANC > packANC =createANC ( userData);
MyArray<ManagerAIC > packAIC =createAIC (userData );
MyArray< ManagerNDX<1>> packNDX1=generate<1>(userData);
MyArray<ManagerNDX<2>> packNDX2=generate<2>(userData);
MyArray<ManagerNDX<3>> packNDX3=generate<3> (userData);
MyArray<ManagerSSK > packSSK =createSSK (userData);
I would be nice if it is formatted to be :-
MyArray<ManagerAAC > packAAC =create (userData);
MyArray<ManagerANC > packANC =createANC (userData);
MyArray<ManagerAIC > packAIC =createAIC (userData);
MyArray<ManagerNDX<1>> packNDX1=generate<1>(userData);
MyArray<ManagerNDX<2>> packNDX2=generate<2>(userData);
MyArray<ManagerNDX<3>> packNDX3=generate<3>(userData);
MyArray<ManagerSSK > packSSK =createSSK (userData);
It also enables block-editing e.g. :-
I want to use it in just a few files (<1% of amount of .h
/.cpp
).
You can install Code alignment extension. It does not work like Word, but it does format your code without much typing.
Format it like this:
std::vector<int> cat = std::vector<int>();
float zombie = 5;
and do not waste time on something that doesn't matter.
Visual studio does have built in automatic formatting ( Edit -> Advanced ) which can be customised in the options menu ( Tools -> Options -> Text Editor -> [language] -> Formatting)
There you can customise how the formatting behaves, although it may not be precise enough to achieve exactly what you want it should be able to get pretty close.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With