Question

I'm using Visual Studio 2013 to edit HTML and have an annoying quirk that I cannot seem to find any answers online. And it seems to be simple.

Let's say I'm creating a <div /> with CSS classes, btn and btn-xs. Unfortunately, Intellisense tries to be too smart and incurrs me EXTRA keystrokes, rather than less. I start typing:

<div class="btn

and we're good so far. At this point, I would like to continue to type the next class. But if I hit the spacebar, this happens:

<div class="btn" |

Where the | represents the cursor. Why does this happen? Can I turn it off? The closest solutions I've found are either:

  • Hit ESCAPE after each class. This closes the Intellisense popup and let's me type normally. Since ESCAPE is a pretty remote key, and I often have many classes to add to an element, I'd rather not make the 5-fret-stretch.
  • I could also just press the arrow-left key to move over. Again, this is a remote key, and I again find myself reaching for the stars with my pinky.

So what's a guy to do? Sure this is a minor irritant, but the whole reason I signed up for this Intellisense train is to use less keystrokes, not more.

Was it helpful?

Solution

Try this:

Menu: Tools -> Options -> Text Editor -> HTML -> Advanced

Change value for "Insert attribute value quotes: to False.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top