For example, this is my snippet in python mode:
# -*- mode: snippet -*- # name: ( # key: ( # -- ($0)
I can expand (to (), but I can not expand a( to a().
(
()
a(
a()
How to expand a( to a()?
Although I don't use them, there are minor modes like smartparens mode (https://github.com/Fuco1/smartparens) which automatically inserts or deletes the matching brackets which will probably work a lot better than using snippet.
Although I don't use them, there are minor modes like smartparens mode (https://github.com/Fuco1/smartparens) which automatically inserts or deletes the matching brackets which will probably work a lot better than using snippet.