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

Proposal to allow to maintain the cursor position after inflection #42

Closed
johannes-mueller opened this issue Aug 10, 2024 · 1 comment · Fixed by #43
Closed

Proposal to allow to maintain the cursor position after inflection #42

johannes-mueller opened this issue Aug 10, 2024 · 1 comment · Fixed by #43

Comments

@johannes-mueller
Copy link
Contributor

johannes-mueller commented Aug 10, 2024

So far, there is no option to maintain the cursor position where it was before the inflection. You can use string-inflection-skip-backward-when-done to determine if the cursor will end up at the end of the inflected string or jump to the beginning, but there is no option to make it remain where it was.

My proposal would be to replace string-inflection-skip-backward-when-done with a config variable string-inflection-final-position with the following semantics

  • 'remain → cursor remains where it was initially
  • 'end → cursor jumps to the end of the inflected string
  • 'beginning → cursor jumps to the beginning of the inflected string

Using (bounds-of-symbol-at-point) that would also allow us to drop string-inflection-word-chars and string-inflection-non-word-chars.

Please drop a short comment whether you are in favor of such a change. If yes I will implement it, if not I will set up a solution in my local config.

@akicho8
Copy link
Owner

akicho8 commented Aug 10, 2024

I agree with the replacement of string-inflection-final-position and the use of (bounds-of-symbol-at-point).
I will probably only use 'end, but there will likely be others who prefer 'remain.

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

Successfully merging a pull request may close this issue.

2 participants