简体   繁体   English

简短的Emmet缩写不适用于css / scss

[英]Short Emmet abbreviations do not work for css/scss

  • VSCode Version: 1.5.2 VSCode版本:1.5.2
  • OS Version: Ubuntu 16.04 操作系统版本:Ubuntu 16.04
  • My settings.json 我的settings.json

     { "editor.snippetSuggestions": "top", "editor.tabCompletion": true } 

    When I try to use Emmet shortcuts in CSS / SCSS, for example: 例如,当我尝试在CSS / SCSS中使用Emmet快捷方式时:

    And I hit tab to complete, I get this: 我点击选项卡完成,我得到了:

Instead of color , similar behaviour with bg . 代替color ,与bg相似。 I did find hackish solution: "editor.quickSuggestionsDelay": "500" . 我确实找到了"editor.quickSuggestionsDelay": "500"解决方案: "editor.quickSuggestionsDelay": "500" But would like to know if there are some better solutions to this problem. 但是想知道是否有更好的解决方案来解决这个问题。

I suggest you change your key bindings with the following: 我建议您使用以下方法更改键绑定:

(Menu: Preferences > Keyboard Shortcuts) (菜单:首选项>键盘快捷键)

{ "key": "enter", "command": "acceptSelectedSuggestion",
                  "when": "editorTextFocus && suggestWidgetVisible" },
{ "key": "tab", "command": "editor.emmet.action.expandAbbreviation",
                  "when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorHasSelection && !editorReadonly && !editorTabMovesFocus" }

The only problem is, to accept any suggestion from intellisense you'll have to use enter instead of tab from now on. 唯一的问题是,要接受来自intellisense的任何建议,从现在开始,您必须使用enter而不是tab

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

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