Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Indentation
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Tonneh
New Member

USA
2 Posts

Posted - Aug 09 2022 :  06:49:05 AM  Show Profile  Reply with Quote
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*

Edited by - feline on Aug 09 2022 09:58:18 AM

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 09 2022 :  09:59:41 AM  Show Profile  Reply with Quote
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?

zen is the art of being at one with the two'ness
Go to Top of Page

Tonneh
New Member

USA
2 Posts

Posted - Aug 09 2022 :  5:13:39 PM  Show Profile  Reply with Quote
If I disable VA, it stops happening. I'm using Visual Studio 2022 and the latest version of VA.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 10 2022 :  05:27:28 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Aug 11 2022 :  07:16:34 AM  Show Profile  Reply with Quote
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.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000