简体   繁体   English

Visual Studio 2013-具有多个类的HTML元素并与intellisense作战

[英]Visual Studio 2013 - HTML elements with multiple classes and fighting with intellisense

I'm using Visual Studio 2013 to edit HTML and have an annoying quirk that I cannot seem to find any answers online. 我正在使用Visual Studio 2013编辑HTML,并且有一个令人讨厌的怪癖,我似乎无法在线找到任何答案。 And it seems to be simple. 这似乎很简单。

Let's say I'm creating a <div /> with CSS classes, btn and btn-xs . 假设我正在使用CSS类btnbtn-xs创建一个<div /> Unfortunately, Intellisense tries to be too smart and incurrs me EXTRA keystrokes, rather than less. 不幸的是,Intellisense试图变得太聪明,并招致我额外的击键,而不是更少。 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. 每节课结束后点击ESCAPE。 This closes the Intellisense popup and let's me type normally. 这将关闭Intellisense弹出窗口,让我正常键入。 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. 由于ESCAPE是一个非常远程的键,并且我经常将许多类添加到元素中,因此我宁愿不要进行5行拉伸。
  • 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. 当然,这是一个小麻烦,但是我注册此Intellisense火车的全部原因是使用更少的按键,而不是更多。

Try this: 尝试这个:

Menu: Tools -> Options -> Text Editor -> HTML -> Advanced 菜单:工具->选项->文本编辑器-> HTML->高级

Change value for "Insert attribute value quotes: to False . 将“插入属性值引号:”的值更改为False

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM