T O P I C R E V I E W |
sdfox |
Posted - Apr 18 2014 : 12:28:55 PM I have auto formatting rules setup within Visual Studio (VS2010), but VA doesn't use them or I don't know how to tell it to use them. Can someone explain this? At this point, the refactoring capability does not save me any time if I have to manually reformat the code after refactoring something. If I surround some code with an if() {} then I have to select the whole block and autoformat from the visual studio menu. I might as well just type it out myself if I have to do that. I would think that there is a way to get that behavior but I must not be finding the option within VA. Please help if you know how to rectify this. |
3 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - May 06 2014 : 09:44:55 AM For me, this is working correctly. Testing the surround with "if" and "do" snippets, I have made sure the indented line in the snippet editor is indented with spaces. If you are using the current version of VA you will get the new improved VA Snippet editor in VS2010, which has a button to show white space in the editor window.
There is one "oddity" here, if the code you select to surround is indented with tabs, then more tabs will be entered, but the indenting with spaces in the VA Snippet will still be done correctly. If the code you selected to surround is indented with spaces, then more spaces will be inserted.
So with code indented with spaces, and the snippet edited to use spaces, no tabs are being inserted for me.
We are looking to make snippets insert spaces instead of tabs when this is set in the IDE options:
case=6712
As always, we need to keep an eye out for the edge cases when doing changes like this. |
sdfox |
Posted - Apr 29 2014 : 6:42:41 PM I simply highlight a block of code, right click, and select one of the many surround with refactoring options. I'm not sure that editing snippets is what I want. The primary issue here is tabs vs. spaces. Why is Visual assist inserting tabs, when I have visual studio setup to convert tabs to 4 spaces? I don't see anywhere within the snippet editor where I'd setup tabs vs spaces as an option. |
feline |
Posted - Apr 18 2014 : 2:01:51 PM How are you doing the surround with an if block? If you are using a VA Snippet then editing the formatting inside the VA Snippet to match the formatting rules you are using is probably the best answer here:
http://docs.wholetomato.com/default.asp?W261 |
|
|