nvim-surround
nvim-surround copied to clipboard
Extend move_cursor to support a customize function
Checklist
- [x] Have you read through
:h nvim-surround
to see if there might be any relevant information there?
Is your feature request related to a problem? Please describe.
For example, I added a link surround for markdown files, and I want to jump to the open (
after surrounding, so that I can input link immediately. I thought move_cursor
was there for this kind of cases, but it seems limited.
Describe the solution you'd like
So, is it a good idea to extend move_cursor
to support a customize function to do "post surround" stuffs?
Additional context Add any other context or screenshots about the feature request here.
I'm not too sure yet; at the very least for your case you can use the add
function to auto populate the link from your clipboard, or something similar.
Thanks for the tip. I can get the link input with get_input()
, but it's not as intuitive as input inside ()
, since we can benifit from autocompletion.
Currently working on adding move_cursor = "sticky"|"end"
; I would need to think harder about a user-defined function since there would need to be some kind of well-defined API.
Edit: Seems like getting every edge case is incredibly hard to do, while also respecting all the operations (CC: @ces42)
Thanks for the tip. I can get the link input with
get_input()
, but it's not as intuitive as input inside()
, since we can benifit from autocompletion.
Related: #145