Efreeto
Efreeto

Reputation: 2261

VS 2013 Auto Brace Complete

Visual Studio 2013's new feature, 'Auto Brace Complete', is quite useful, but I feel I have not unlocked its full potential to make it more useful.

So if I wanted to type newstr="Hello World" + oldstr;, before the 'Hello World' is typed in, the closing quotation mark is already typed in after the words. Now, how should I tell VS2013 that I finished typing in the braces so it can know that I want to leave the braces and go on to the next part?

In other words, for the above example, what is the expected behavior in step 4?

  1. newstr=
  2. "
  3. Hello World
  4. ???
  5. + oldstr;

Should it be another " key? That seems to defeat the purpose of using auto braces. Should it be the right arrow key then? But, that key is far from the typing area, so I might as well just use " instead. Enter key or Shift+space seem like the logical choice to me, but neither works as I intended.

Can anyone shed any light on this issue? Thank you.

Upvotes: 0

Views: 169

Answers (3)

Justin Emgarten
Justin Emgarten

Reputation: 2368

Press tab to jump outside of the quotes.

Upvotes: 1

Jimmy
Jimmy

Reputation: 28396

Should it be another " key? That seems to defeat the purpose of using auto braces.

Why is using " the wrong key? Auto-braces provides 2 things to the editing experience:

  1. Inserts the closing braces so you don't have to (in this case, you only had to type the opening quote)
  2. Makes it easy to move past the closing brace (or quote) without having to use the arrow keys or mouse. As you correctly pointed out, the arrow keys are inefficient when typing because you have to move your hand away and back. Typing another " is a much faster way to move the cursor, and it will do the Right Thing and just move the cursor forward instead of typing an unwanted ".

Upvotes: 1

rubenvb
rubenvb

Reputation: 76529

Just typing the closing quotation marks " is exactly what is expected. They only serve as a visual aid, or when you're inserting a string literal in the middle of a line.

Upvotes: 1

Related Questions