【问题标题】:Atom Editor Not Reading All The Snippets in Snippets.csonAtom 编辑器没有阅读 Snippets.cson 中的所有片段
【发布时间】:2015-10-26 16:21:32
【问题描述】:

我的 sn-ps.cson:-

'*':
  'WordPress theme directory':
    'prefix': 'wpThemeDirectoryUri'
    'body': """
    get_template_directory_uri()
        """

'*':
  'WordPress Site URL (No Trailing Slash)':
    'prefix': 'wpSiteUrl'
    'body': """
      site_url()
        """

在编辑器中,当我按alt + shift + s 热键搜索可用的sn-ps 并输入“wp”时,它只列出wpSiteUrl

不应该也列出wpThemeDirectoryUri吗?

如果我删除第二个 sn-p。它列出了wpThemeDirectoryUri

我的 sn-ps 很大,你的解决方案必须支持多行 sn-ps。

【问题讨论】:

    标签: coffeescript atom-editor


    【解决方案1】:

    在阅读@lee-dohm 答案后:-

    Atom Editor: multiple snippets

    我找到了解决办法:-

    '*':
      'WordPress theme directory':
        'prefix': 'wpThemeDirectoryUri'
        'body': """
        get_template_directory_uri()
            """
    
      'WordPress Site URL (No Trailing Slash)':
        'prefix': 'wpSiteUrl'
        'body': """
          site_url()
            """
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-24
      • 2015-09-23
      • 1970-01-01
      • 2014-10-29
      • 1970-01-01
      • 2016-05-05
      • 2016-12-15
      • 1970-01-01
      相关资源
      最近更新 更多