tpope / vim-surround

surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
https://www.vim.org/scripts/script.php?script_id=1697
13.39k stars 444 forks source link

Restore cursor position? #383

Open unphased opened 10 months ago

unphased commented 10 months ago

I typically use this most heavily to toggle quote types as the content of a string evolves.

E.g. cs'"

The only pain point with this is that the cursor gets brought to the front of the whole string, when keeping it in its original place would be preferred because experience is showing me that 90% of the time I want to go move right back to where i was, and sometimes this is a significant distance.

I wish there was at least an action to smack it back to where it was prior to the action. Could we at least add that if we cannot make it stay put in the same spot? I would even be open to adding it to the jumplist so i can use that.

ic-768 commented 3 months ago

This would be awesome. Same use case for me