Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

Add setting to toggle the yank register using the system clipboard#295

Merged
71 merged 5 commits into71:masterfrom
blefevre:feat/system-clipboard-setting
Apr 29, 2023
Merged

Add setting to toggle the yank register using the system clipboard#295
71 merged 5 commits into71:masterfrom
blefevre:feat/system-clipboard-setting

Conversation

@blefevre
Copy link
Contributor

@blefevre blefevre commented Apr 6, 2023

Adds a setting to enable/disable the default yank register (") from mapping to the system clipboard.
Defaults to enabled so there will be no change for existing users.

Copy link
Owner

@71 71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! For some reason I thought this was already implemented.

Please change the documentation comment of ClipboardRegister to indicate that it will not map to the system clipboard if useSystemClipboard is false.

@ilyagr
Copy link

ilyagr commented Apr 9, 2023

How do you access the clipboard with this setting? Do you rebind Ctrl-V back to paste in insert mode?

I think I'd prefer the default register to be different from the clipboard register. However, that might be more work to implement.

Please feel free to merge this PR without resolving these, since I'm asking for additional features that can be worked on by people who need them in separate PRs.

@71
Copy link
Owner

71 commented Apr 9, 2023

@ilyagr Yep, similarly to VSCodeVim and others, you'd use the built-in commands to manipulate the clipboard. Further settings to assign another register to the clipboard might be interesting, though.

Even if we only support null and "dquote" (the default) in this PR, it might be interesting to change "dance.useSystemClipboard": boolean to "dance.clipboardRegister": "<register>" | null for better support of such future changes.

@blefevre blefevre force-pushed the feat/system-clipboard-setting branch from 4bbf0aa to 2994809 Compare April 11, 2023 02:17
@blefevre
Copy link
Contributor Author

Thanks for the feedback, I've adjusted the setting to be a dropdown so the user can select their own clipboard register.
The current options are ", null, and A-Z, but I'm happy to change those as you see fit.

Copy link
Owner

@71 71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I prefer this approach, even though it's a bit less obvious to implement.

@ilyagr
Copy link

ilyagr commented Apr 12, 2023

I've adjusted the setting to be a dropdown so the user can select their own clipboard register.

Thank you, I very much appreciate it!

The current options are ", null, and A-Z, but I'm happy to change those as you see fit.

Vim uses + and * for X11 selection (which I don't care about). Kakoune doesn't seem to use that. I'm unsure about Dance. If it's easy to make these an option, I think it'd be nice, but picking something between A-Z works too.

@blefevre
Copy link
Contributor Author

I think I've addressed all the above feedback including adding + and *, it should be pretty trivial to add new registers as long as they aren't already in use by Dance.

Copy link
Owner

@71 71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry for the delay, I've been really busy.

I also have a few more comments, but after this we should be good to go.

Copy link
Owner

@71 71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more nitpicks... Hopefully really the last round!

@blefevre
Copy link
Contributor Author

Sorry for the delay, this should be good to go now.

Copy link
Owner

@71 71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@71 71 merged commit 3a75750 into 71:master Apr 29, 2023
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 this pull request may close these issues.

3 participants