kakoune-snippets icon indicating copy to clipboard operation
kakoune-snippets copied to clipboard

[Feature request] Expose jumping abilities

Open andreyorst opened this issue 6 years ago • 1 comments

Jumping can accept the count variable. It also could be handy to be able jump backward in case you edited some placeholder wrong. Ability to skip whole snippet and jump directly to the last placeholder also comes in handy when snippet is fine by default.

andreyorst avatar Jan 17 '19 14:01 andreyorst

There's also a useful feature that allows skipping $0 placeholder at the very end of the snippet, in case we want to jump out, called automatic jumpout. So instead of definig most snippets like so:

println!("${1:text}");$0

Most of snippets could be defined like

println!("${0:text}");

I've originally did it in my plugin, because of limitation that $n type placeholders were not supported, but kinda liked this feature, because we often want to continue outside of a snippet rather than inside.

andreyorst avatar Feb 06 '19 11:02 andreyorst