Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Visual Studio 2013 to exit editing class tag when pressing SPACE

The feature I like in VS2013 is the CSS Class IntelliSense in CSHTML files, however, their new feature to exit the tag when pressing SPACE is quite annoying.

For example: I usually use Bootstrap with multiple classes, says:

<button class="btn_ <- My pointer is here

and I want to press SPACEand add btn-default, but instead, it jumps out:

<button class="btn" _ <- new pointer position

and it takes me more time to work with classes. Is there a way to turn this off?

P.s: my current fastest way to overcome this is to press ESCbefore pressing SPACE.

like image 403
Luke Vo Avatar asked Dec 09 '13 13:12

Luke Vo


People also ask

How do you show tabs and spaces in Visual Studio code?

In Visual Studio for Windows, to display whitespace characters (tabs, spaces, etc) you simply press Ctrl + R, Ctrl + W.

How do I remove a space dot in Visual Studio?

Edit -> Advanced -> untick View White Space.

What is the use of IntelliSense?

IntelliSense is a code-completion aid that includes a number of features: List Members, Parameter Info, Quick Info, and Complete Word. These features help you to learn more about the code you're using, keep track of the parameters you're typing, and add calls to properties and methods with only a few keystrokes.


1 Answers

Honestly, trying out several combinations, using Esc before Space may be your quickest way. It also lets you "exit" when you're done adding all the classes you need,

e.g. class="btn<ESC><SPACE>btn-secondary<ESC><SPACE>alert<ESC><SPACE>alert-info<SPACE>" <-- this quote is skipped at the last space and you can add other attirbutes

Another option is to disable the auto-completion of attributes entirely. This can be done by going to Tools > Options > Text Editor > HTML > Advanced, then set Insert attribute value quotes to false.

like image 178
brazilianldsjaguar Avatar answered Sep 25 '22 08:09

brazilianldsjaguar