質問

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.

役に立ちましたか?

解決

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.

他のヒント

Tools > Options > Text Editor > Html > Advanced and tuirn off insert attribute value quotes. Yeh you have to put quotes in yourself but I would rather that then having to skip back every time

FYI the esc option didn't work for me

some one at microsoft needs a lesson in UX though for sure

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top