Allow context around tab stops
Hi,
I have a couple of snippets like the following:
func(${1:arg1}, arg2 = ${2:defaultValue})
Now, you sometimes do not want to set arg2. In Python for example, it can make a difference whether you omit an argument or set it to its default value. Thus, when I reach tab stop 2 and hit "delete" or "backspace", I would like ", arg2 =" to disappear with it.
I would offer to implement this, but I'm not sure how to expand the tab stop syntax without breaking compability.
Hey tinloaf,
As a temporary fix, the behavior you describe could be emulated with an extra tabstop:
func(${1:arg1}${2:, arg2 = ${3:defaultValue}})
After pressing tab the second time, everything after the comma would be selected and ready to be deleted if not needed. The third tabstop would be deleted along with it.
**Edit: Just noticed however, the above snippet tiggers a bug where the tab marker for the second tabstop is not updated as you write text for the first tabstop. Though i do believe the above snippet to be valid.
:+1: