Emmet: الإكمال التلقائي لا يعمل مع مفتاح التبويب ل JSX في نص Sublime 3، بناء 3143

تم إنشاؤها على ٤ فبراير ٢٠١٨  ·  2تعليقات  ·  مصدر: emmetio/emmet

مرحبًا ، أعلم أن هذا يعمل ، لدي كمبيوتر محمول آخر حيث يعمل ، ولكن هنا قمت بالتحديث إلى أحدث إصدار من Sublime text 3 ، ولا توجد علامة html تعمل في الإكمال التلقائي في JSX.

هيريس ما أستخدمه ،

اي فكرة لماذا؟ هل هناك أي مشكلة معروفة في المكونات الإضافية الأخرى ، كنت أتصفحها ، وأحاول اكتشافها ، لكن لا شيء يعمل

{
  "keys": ["tab"],
  "command": "expand_abbreviation_by_tab",

  // put comma-separated syntax selectors for which
  // you want to expandEmmet abbreviations into "operand" key
  // instead of SCOPE_SELECTOR.
  // Examples: source.js, text.html - source
  "context": [
    {
      "operand": "source.js, meta.class.js, meta.group.braces.curly.js, meta.group.braces.round.js, meta.jsx.js ",
      "operator": "equal",
      "match_all": true,
      "key": "selector"
    },

    // run only if there's no selected text
    {
      "match_all": true,
      "key": "selection_empty"
    },

    // don't work if there are active tabstops
    {
      "operator": "equal",
      "operand": false,
      "match_all": true,
      "key": "has_next_field"
    },

    // don't work if completion popup is visible and you
    // want to insert completion with Tab. If you want to
    // expand Emmet with Tab even if popup is visible --
    // remove this section
    {
      "operand": false,
      "operator": "equal",
      "match_all": true,
      "key": "auto_complete_visible"
    },
    {
      "match_all": true,
      "key": "is_abbreviation"
    }
  ]
}

التعليق الأكثر فائدة

لست متأكدا لماذا، ولكن هذا أقل عمل!

[
  { "keys": ["tab"], "command": "expand_abbreviation_by_tab", "context":
    [
        { "operand": "source.js", "operator": "equal", "match_all": true, "key": "selector" },
        { "match_all": true, "key": "selection_empty" },
        { "operator": "equal", "operand": false, "match_all": true, "key": "has_next_field" },
        { "operand": false, "operator": "equal", "match_all": true, "key": "auto_complete_visible" },
        { "match_all": true, "key": "is_abbreviation" }
    ]
}
]

ال 2 كومينتر

لست متأكدا لماذا، ولكن هذا أقل عمل!

[
  { "keys": ["tab"], "command": "expand_abbreviation_by_tab", "context":
    [
        { "operand": "source.js", "operator": "equal", "match_all": true, "key": "selector" },
        { "match_all": true, "key": "selection_empty" },
        { "operator": "equal", "operand": false, "match_all": true, "key": "has_next_field" },
        { "operand": false, "operator": "equal", "match_all": true, "key": "auto_complete_visible" },
        { "match_all": true, "key": "is_abbreviation" }
    ]
}
]

كانت هناك نفس المشكلة ، كانت وحدة التحكم ترسل تحذيرات مثل هذه "يجب أن تكون قيمة المستوى الأعلى مصفوفة".

{
  "keys": ["tab"],
  "command": "expand_abbreviation_by_tab",

  // put comma-separated syntax selectors for which
  // you want to expandEmmet abbreviations into "operand" key
  // instead of SCOPE_SELECTOR.
  // Examples: source.js, text.html - source
  "context": [
    {
      "operand": "source.js, meta.class.js, meta.group.braces.curly.js, meta.group.braces.round.js, meta.jsx.js ",
      "operator": "equal",
      "match_all": true,
      "key": "selector"
    },

    // run only if there's no selected text
    {
      "match_all": true,
      "key": "selection_empty"
    },

    // don't work if there are active tabstops
    {
      "operator": "equal",
      "operand": false,
      "match_all": true,
      "key": "has_next_field"
    },

    // don't work if completion popup is visible and you
    // want to insert completion with Tab. If you want to
    // expand Emmet with Tab even if popup is visible --
    // remove this section
    {
      "operand": false,
      "operator": "equal",
      "match_all": true,
      "key": "auto_complete_visible"
    },
    {
      "match_all": true,
      "key": "is_abbreviation"
    }
  ]
}

الرمز أعلاه هو كائن ،
والرمز أدناه عبارة عن مجموعة من الكائنات

[
  { "keys": ["tab"], "command": "expand_abbreviation_by_tab", "context":
    [
        { "operand": "source.js", "operator": "equal", "match_all": true, "key": "selector" },
        { "match_all": true, "key": "selection_empty" },
        { "operator": "equal", "operand": false, "match_all": true, "key": "has_next_field" },
        { "operand": false, "operator": "equal", "match_all": true, "key": "auto_complete_visible" },
        { "match_all": true, "key": "is_abbreviation" }
    ]
}
]

يعمل هذا على إصلاح تحذير "يجب أن تكون قيمة المستوى الأعلى عبارة عن مصفوفة" ، ولهذا السبب يعمل.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات

القضايا ذات الصلة

deathmood picture deathmood  ·  15تعليقات

HeikoMamerow picture HeikoMamerow  ·  16تعليقات

DanielRuf picture DanielRuf  ·  5تعليقات

midgethoen picture midgethoen  ·  8تعليقات

sergeche picture sergeche  ·  25تعليقات