Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I delete snippet history on InsertLeave? #75

Closed
uga-rosa opened this issue Jul 14, 2021 · 5 comments
Closed

Can I delete snippet history on InsertLeave? #75

uga-rosa opened this issue Jul 14, 2021 · 5 comments

Comments

@uga-rosa
Copy link
Contributor

In my case, once I leave insert mode, I don't jump to a previous history. It's my fault for leaving without jumping to the end...

@L3MON4D3
Copy link
Owner

You could add an autocommand to set Luasnip_current_nodes[buffer_number] to nil.

@uga-rosa
Copy link
Contributor Author

uga-rosa commented Jul 14, 2021

After setting it on InsertLeave, jumping itself is completely disabled. Is it also triggered on expanding?
Should I map to <esc>?

@L3MON4D3
Copy link
Owner

Yeah, right, we leave insert on jumping, ofc.
You could try mapping to Esc, then it would depend on how neovim processes input given via feedkeys()

@uga-rosa
Copy link
Contributor Author

I'm sorry for asking such an elementary question due to my lack of understanding of the principle :_(

I tried it and it worked well, so I think I'll stick with it. Thanks!

@L3MON4D3
Copy link
Owner

Oh DW, I think it's of general interest, won't hurt to have it here :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants