【问题标题】:How to expand the key before which there is a non-key string?如何扩展之前有非键字符串的键?
【发布时间】:2017-04-27 11:47:39
【问题描述】:

例如,这是我在python模式下的sn-p:

# -*- mode: snippet -*-
# name: (
# key: (
# --
($0)

我可以将(扩展为(),但我无法将a(扩展为a()

如何将a( 扩展为a()

【问题讨论】:

  • 您的问题并不完全清楚。您能否添加更多细节,例如“当我这样做时......我期望......但相反......发生了”?另外,请指定您的 emacs 版本。

标签: emacs yasnippet


【解决方案1】:

虽然我不使用它们,但有一些次要模式,例如 smartparens 模式 (https://github.com/Fuco1/smartparens),它会自动插入或删除匹配的括号,这可能比使用 sn-p 更好。

【讨论】:

    猜你喜欢
    • 2011-09-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-26
    • 2021-08-11
    • 2011-04-26
    • 2020-04-05
    相关资源
    最近更新 更多