Skip to content

Better way to cancel the "session". #872

@allworldg

Description

@allworldg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions