Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you move the cursor past the closing quotes when typing property values in Visual Studio?

When editing code in Visual Studio (2012 in my case), I like that it inserts quoutes for property values automatically. If I can select an appropriate value from the Intellisense list and press Tab to insert it, the cursor is moved out of the quotes, which is great. When I need to type a unique value, however, Tab simply inserts a tab character. I'm constantly reaching over to press the right arrow key to leave the quotes which is quite inconvenient.

I'd imagine there's a more convenient way to leave the quotes, but what is it?

like image 265
Booers Avatar asked Dec 19 '12 08:12

Booers


2 Answers

If you just type an (additional) closing quote, the cursor will move outside the quotes without creating an extraneous quote, and without requiring you to move your hand over to the arrow keys. Same goes for automatically generated closing parentheses and curly braces. Seems obvious now but I had basically the same question as you for several days trying to find answers on internet searches.

like image 126
Alex9000 Avatar answered Oct 15 '22 12:10

Alex9000


good question.

Press Double quote " (shift + ' ) to close quote (not right arrow). There won't be two quotes VS will just close quote & you won't have to move hand to press right arrow key.

In Visual Studio using intellisence and quotes are automatically inserted as you stated which is nice. Instead of pressing the right arrow key to move over the close quote; the above is another method you may like which will keep hands on home keys.

Hope this helps.

like image 22
Catto Avatar answered Oct 15 '22 12:10

Catto