Visual Assist X: curly braces are moving during refactoring
I use Visual Assist X, build from 05.01.2009, but the same problem occurred in the previous releases as well. (I run it on MSVS 2005)
When I do some refactoring (like extracting a method), everything's fine, but all the curly braces move forward. For example, before refactoring the code looked like this:
while (expr)
{
doSmth();
}
After refactoring:
while (expr)
{
doSmth();
}
开发者_Python百科
So, I need to move manually all the brackets. Sure, the problem is minor, but it becomes annoying when you do a lot of refactoring. Is it a bug or just default settings? So, does anyone know a workaround?
It looks like Visual Assist takes its cue from the Visual Studio brace placement settings. To tweak this option, visit Tools|Options, then navigate to Text Editor, C/C++, Formatting. Make sure "Indent braces" is unticked.
(A related tip for general formatting issues after fiddling around with text is that you can get Visual Studio to do the reformatting for you. Put the cursor on one of the mispositioned braces, press Ctrl+Shift+] (extend selection to matching brace), then press Ctrl+K, Ctrl+F (reformat selection).)
BTW for genuine Visual Assist bugs the forum is a good place to go:
http://www.wholetomato.com/forum/
They seem to be only a small company, but they're generally pretty good at keeping track of open issues.
精彩评论