Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Spaces inside parentheses of function call

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
deselekt Posted - Oct 17 2016 : 10:57:26 AM
Hello.
I need to add extra spaces inside parentheses of function call, like this:
memcpy( &a, &b, sizeof( a ) );


How can I do that? I edited (...) snippet and added spaces there, but nothing happens. I am using build 2112 and Visual Studio 2015 Community Edition.
6   L A T E S T    R E P L I E S    (Newest First)
deselekt Posted - Oct 17 2016 : 11:52:32 AM
In fact I do not worry much about formatting after paste; I can even work with VS2015 auto formatting enabled if I know how to disable auto correction of indentation inside the code line, like in example mentioned above (tabs between dwShort and "= 0" get collapsed). If i know how to turn it off, I will turn on VS autoformatting and problem will be solved. Of course I can always type Ctrl+Z, but it's rather annoying.
ChrisG Posted - Oct 17 2016 : 11:41:25 AM
You can stop the formatting after paste by disabling the 'Format after paste' Visual Assist option I mentioned in the previous post.

That along with unchecking the options in the Visual Assist auto formatting General section as you have done should prevent any formatting of your code.
deselekt Posted - Oct 17 2016 : 11:37:47 AM
I just simply unchecked all checkboxes in (Tools | Options | Text Editor | C/C++ | Formatting | General), but there is still indentation and formatting on paste.
ChrisG Posted - Oct 17 2016 : 11:29:51 AM
No, unfortunately there is no way to do that.

How did you disable Visual Studio auto formatting?

Visual Assist will still use the settings you have for Visual Studio formatting when you paste code if 'Format after paste' is enabled in the following menu.
(VAssistX | Visual Assist Options | Editor)

It is worth noting that you can undo the formatting after a paste by using (Ctrl+Z) immediately after pasting.
deselekt Posted - Oct 17 2016 : 11:17:10 AM
This option is already checked. But I had to turn off Visual Studio formatting, because there are some things that could not be turned off, for example I can not format like this:

LPSTR lpszOneLongLine   = NULL;
DWORD dwShort           = 0;

The second line gets autoformatted with removing tabs indentation inside it. Also I do not like the way how spaces are added inside the parentheses of control blocks (only one space is added, it removes last space before ")" when I type ")", and does not add it again when i press Enter).
That's why I disabled Visual Studio autoformatting and working with VA formatting only.
Is there a way to add spaces inside parentheses using only VA with VS formatting disabled?
ChrisG Posted - Oct 17 2016 : 11:07:22 AM
Hello deselekt,

Visual Assist uses your Visual Studio automatic formatting settings. To modify these settings, please navigate to the following menu.
(Tools | Options | TextEditor | C/C++ | Formatting)

Each option has an example, making it simple to tweak the formatting to your liking.

Specifically, look for 'Insert space within parenthesis of an argument list' and other settings in the Spacing section.

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