Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Indentation

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Tonneh Posted - Aug 09 2022 : 06:49:05 AM
So I'm having an issue with indentation with brackets.
Example of issue:

if (asdad) 
    {
}
instead of

if (asdada)
{
}

*edited by feline, so code indenting shows up*
4   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 11 2022 : 07:16:34 AM
I have the settings, thank you for these:

case=148427

So far I cannot reproduce the problem here. What, exactly, are you doing to trigger this formatting bug? With both your VA and IDE settings imported, sitting in a cpp file, I have typed in the following simple code test:

void simpleFormatIf()
{
	if(1 == 2)
	{| }
}

not accepting any listboxes. | is where the keyboard caret ended up when I typed the {

When I then press Enter to add a new line, without moving the caret, I end up with:

void simpleFormatIf()
{
	if (1 == 2)
	{
		|
	}
}

So I am wondering if you are seeing this on something other than typing the code block.

Another thought, does turning Off:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Formatting -> General -> Enable ClangFormat support

have any effect on this problem? If a clang format file is a factor then that is a set of formatting options that are not included in either the IDE or VA settings, plus there can be several clang-format files that need to be considered.
feline Posted - Aug 10 2022 : 05:27:28 AM
That's clear proof we are involved, thank you for checking. No sign of this problem on a fresh, default install of VA on VS2022, checking in C++, so it doesn't automatically happen.

Can you please export your VA and IDE settings and send them to me:

VA Options -> Performance -> Export Settings
IDE tools menu -> Import and Export Settings -> Export selected environment settings

I can then import them here and see if I can reproduce the problem. Assuming I can I can then look and see what is going on here.

Please send me the files via email:

[email protected]

including this thread ID or URL in the description, so we can match it up.
Tonneh Posted - Aug 09 2022 : 5:13:39 PM
If I disable VA, it stops happening. I'm using Visual Studio 2022 and the latest version of VA.
feline Posted - Aug 09 2022 : 09:59:41 AM
My first thought is that the indenting is coming from the IDE, not from VA, since VA doesn't do much in the way of indenting. But there may be some interaction at work here.

Which IDE and version of VA are you using?

If you disable VA via:

VAssistX -> Enable/Disable Visual Assist X

does this extra indenting stop happening?

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000