Exit parentheses in Visual Studio 2013

Well, this is stupid, but I have no idea how people deal with this, and I hope I missed something ...

When I write something like this:

if (n == 0) 

... The closing bracket is added as soon as I type the opening bracket. The only way I know to get out of them now is to get to the end and press the "End" key or something like that ... It hurts my shui, you know? And yet, apparently, they thought this feature was a cool idea, so ...

What do you usually do to tell the IDE that you are done with this bit and are you ready to move on to the next? The same applies to automatic quotation marks and materials in the XAML editor.

+6
source share
6 answers

Just keep typing - if you type your own ) , when the cursor is in front of the automatic one, it should not create another one ) , but simply move the cursor over it.

(Disclaimer: I'm not sure if this works on Visual Studio Visual Studio - I have a set of extensions)

+7
source

You can press Ctrl + Shift + Enter to open a new line below the current without moving the cursor to the end of the line.

+4
source

To add to this, the tab is another option, and it gets easier for me:

  • In your example, enter the logic, press "Tab" to skip the end bracket.
  • If you are inside the auto quotes, enter the text and press the key twice.

Like the other answer, it only applies the first time you enter, so if you come back to change something, you stay with the "End" and "Arrow" keys.

+3
source

In Visual Studio 2015 with the installed capabilities of Power Tools (it may work earlier), being inside the autocomplete block (quotation marks or curly braces):

end goes to the end of the line (usually a slow type / search)

" / ) entering the same key as the autocomplete already inserted will simply replace the automatically inserted character

tab jumps end of autocomplete (e.g. curly braces or quotation marks)

shift + enter adds; at the end of a line, jumps to a new line (often what you want)

ctrl + shift + enter goes to a new line

+2
source

In VS there is a short key - "Edit.LineEnd" - pressing "End" you get to the end of the current line. I rewrote it (for me the best option was "Alt-Enter") and use it to go beyond the parentheses and quotation marks.

0
source

Press the enter key when you are finished typing.

0
source

Source: https://habr.com/ru/post/948288/


All Articles