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

Extend move_cursor to support a customize function #281

Closed
1 task done
hulufei opened this issue Nov 16, 2023 · 4 comments · Fixed by #334
Closed
1 task done

Extend move_cursor to support a customize function #281

hulufei opened this issue Nov 16, 2023 · 4 comments · Fixed by #334
Assignees
Labels
enhancement New feature or request

Comments

@hulufei
Copy link

hulufei commented Nov 16, 2023

Checklist

  • 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.

@hulufei hulufei added the enhancement New feature or request label Nov 16, 2023
@kylechui
Copy link
Owner

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.

@hulufei
Copy link
Author

hulufei commented Nov 16, 2023

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.

@kylechui kylechui self-assigned this May 30, 2024
@kylechui
Copy link
Owner

kylechui commented Jun 5, 2024

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)

@kylechui kylechui mentioned this issue Jun 5, 2024
3 tasks
@kylechui kylechui linked a pull request Jun 5, 2024 that will close this issue
3 tasks
@kylechui
Copy link
Owner

kylechui commented Jun 8, 2024

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

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

Successfully merging a pull request may close this issue.

2 participants