Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Make "insert closing" configurable or revert

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
Uniwares Posted - Jul 28 2023 : 05:57:29 AM
This latest feature drives me crazy, whenever I type a ' or " now I always get two, independent of context or surrounding characters.
I love the closing brackets, but those two chars should be inserted as a double ONLY when there is nothing else around except whitespace or EOL/BOL.
I am this '' close to disabling the feature altogether.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jul 28 2023 : 09:12:57 AM
I got the same results as you are showing in C# in VA 2420, so it doesn't seem to be a new change. Testing this, there is a difference as to how this works in C++ vs C#, so that's not ideal.

In C++ if the caret is at the start of a symbol then only a single " or ' is inserted, while in C# two are inserted.

case=149815

Assuming you are mainly looking to wrap a symbol in " rather than ' you can create a new VA Snippet and set the surround with to " and the body to:

"$selected$"

if you are interested you can select the following XML and paste it into the VA Snippet editor to add this snippet to your system:

<VA_Snippet>
<Language>C#</Language>
<Title />
<Shortcut>SurroundWith="</Shortcut>
<Description />
<Code>"$selected$"</Code>
</VA_Snippet>

strangely though the matching snippet, to surround with ' isn't working for me.

case=149816

Just to add to the variables at work here, there is no need for the snippets since in VS2022, C++, selecting a symbol and pressing either ' or " surrounds it, even with VA disabled in the extension manager.
Uniwares Posted - Jul 28 2023 : 06:58:07 AM
I think that handling of certain cases has changed, as before I never noticed this annoyance.



As you can see in this clip, when at the beginning of a word, it does insert double quotes, same at the end, sometimes.
feline Posted - Jul 28 2023 : 06:34:49 AM
Is this a recent change in behaviour? Your description suggests it is.

What sort of situations are you seeing this happen in, when you feel it should not be happening?

Using VS2022 and VA 2491.0, C++, with the perhaps overly simple test case:

void test|FuncBa|sic()
{
	std::string fred = "hello| wor|ld";
	fred.append("-", 3)|;
	std::string *|pName;
	p|Name;
}


I have tried typing either " or ' at each of the positions marked with | and only a single character is inserted.

Yet when typing the line:

pName = "fred";

I get the closing double quotes inserted as expected.

So I am wondering if you are running into a more context specific problem.

More generally, we are considering letting you turn this feature on and off for individual characters:

case=82774

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