Atom 片段不适用于 scss 多行片段

Atom snippets not working with scss multiline snippet

我正在尝试在 Atom 编辑器中使用我的自定义片段。这是我的 snippets.cson 文件:

# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
#   'Console log':
#     'prefix': 'log'
#     'body': 'console.log '
#
# Each scope (e.g. '.source.coffee' above) can only be declared once.
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# https://atom.io/docs/latest/using-atom-basic-customization#cson
'.text.html.basic':
  'Bootstrap css link':
    'prefix': 'bootstrap'
    'body': '<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">'

  'Vue minified':
    'prefix': 'vuemin'
    'body': '<script src="https://cdn.jsdelivr.net/vue/latest/vue.min.js"></script>'

  'Vue develompent':
    'prefix': 'vuedev'
    'body': '<script src="https://cdn.jsdelivr.net/vue/latest/vue.js"></script>'

  'Placehold img':
    'prefix': 'ph'
    'body': '<img src="https://placehold.it/" alt="">'
  'Telephone':
    'prefix': 'tel'
    'body': '<a href="tel:+48888888888">+48 888 888 888</a>'

'.source.css.scss':
  'Breakpoint Foundation':
    'prefix': 'bp'
    'body': """
      @include breakpoint() {
        
      }
    """

'.source.css.scss':
  'Breakpoint Foundation Medium':
    'prefix': 'bpm'
    'body': """
      @include breakpoint(medium) {
        
      }
    """

'.source.css.scss':
  'Breakpoint Foundation Large':
    'prefix': 'bpl'
    'body': """
      @include breakpoint(large) {
        
      }
    """

  'Kentico comment':
    'prefix': 'kc'
    'body': '/*##*/'

除此部分外一切正常:

'.source.css.scss':
  'Breakpoint Foundation':
    'prefix': 'bp'
    'body': """
      @include breakpoint() {
        
      }
    """

'.source.css.scss':
  'Breakpoint Foundation Medium':
    'prefix': 'bpm'
    'body': """
      @include breakpoint(medium) {
        
      }
    """

'.source.css.scss':
  'Breakpoint Foundation Large':
    'prefix': 'bpl'
    'body': """
      @include breakpoint(large) {
        
      }
    """

当我编辑 scss 文件时,只有 bplkc 片段有效。 我有 1.10.0 Atom 和 1.11.0 autocomplete-snippets 和 1.0.2 snippets 插件。

您需要将共享相同范围的所有片段分组,否则之前的实例会被后面的实例覆盖。

示例

'.source.css.scss':
  'Breakpoint Foundation':
    'prefix': 'bp'
    'body': """
      @include breakpoint() {
        
      }
    """
  'Breakpoint Foundation Medium':
    'prefix': 'bpm'
    'body': """
      @include breakpoint(medium) {
        
      }
    """
  'Breakpoint Foundation Large':
    'prefix': 'bpl'
    'body': """
      @include breakpoint(large) {
        
      }
    """

有人可能会争辩说 Atom 应该合并这些密钥,但这 discussion 与开发人员有关。