Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,这是我在 python 模式下的片段:
# -*- mode: snippet -*- # name: ( # key: ( # -- ($0)
我可以扩展(到(),但我不能扩展a(到a()。
(
()
a(
a()
如何扩展a(至a()?
虽然我不使用它们,但有一些次要模式,如 smartparens 模式 ( https://github.com/Fuco1/smartparens ),它会自动插入或删除匹配的括号,这可能比使用片段更好。