How to expand the key before which there is a non-key string?

38 Views Asked by At

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().

How to expand a( to a()?

1

There are 1 best solutions below

0
Ian4264 On

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.