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

Make newly pasted text selected #3401

Closed
xcpky opened this issue Aug 12, 2022 · 3 comments · Fixed by #4458
Closed

Make newly pasted text selected #3401

xcpky opened this issue Aug 12, 2022 · 3 comments · Fixed by #4458
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@xcpky
Copy link

xcpky commented Aug 12, 2022

I think it's better when you delete/yank some paragraphs and paste it, the newly pasted text is selected, for reasons below:

we often need to modify the pasted code immediately, and it's quite annoying to select it again. For example, helix , for now, can't automatically indent the pasted code correctly, it only holds the original indent. So probably we should indent manually by shortcut. Honestly, I often use helix for acm training, that's the issue I meet every day. And I think this feature along with the automatic indent for pasted code are quite useful.

@xcpky xcpky added the C-enhancement Category: Improvements label Aug 12, 2022
@the-mikedavis
Copy link
Member

The workaround I use for this currently is to use R or Space-R rather than P or Space-P.

I think this could work well as the default behavior though, especially in combination with #1596 so that you could jump back to the pre-paste selection if it was important. Even without #1596, you could collapse the selection to get close to where you were, or use the jumplist.

@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Aug 12, 2022
@xcpky
Copy link
Author

xcpky commented Aug 12, 2022

Yes, I do believe make it a default behavior can save a lot effort.

@the-mikedavis
Copy link
Member

the-mikedavis commented Aug 14, 2022

Kakoune recently adopted this behavior (in the development branch but not yet released):

See mawww/kakoune#4277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants