LuaSnip icon indicating copy to clipboard operation
LuaSnip copied to clipboard

Better way to cancel the "session".

Open allworldg opened this issue 1 year ago • 14 comments

I have read #258 and #770. Create a autocmd or set region_check_events to cancel the "session" is great. But if I create a big snippet, I think region_check_events cannot solve the "cancel" problem.

For example, I use html5~ snippet to create a basic html structure, so I will always code in the <body></body> (in the snippet area). I move the cursor in <body></body> then press Tab . the cursor still jump to <title></title>(the placeholder position). It's still annoyed.

Is there any way to make luasnip cancel the "session" by detecting if cursor move out of the placeholder region (not just snippet region) ?

Like vscode ("edit,change the mode,move the cursor" will not cancel the session , but move cursor out of the placeholder region will do.) vscodeSnippet2

allworldg avatar Apr 22 '23 08:04 allworldg