helix icon indicating copy to clipboard operation
helix copied to clipboard

Added command to copy between registers

Open uek-1 opened this issue 1 year ago • 6 comments

Added a command to copy the contents of the selected register to another. Closes #9552.

uek-1 avatar Feb 24 '24 19:02 uek-1

I wonder if this is quite the right command tough. kacuone has a more generic :set-register typable command. That could be combined with command expansion (where I think being able to expand to registers would be quite useful) to implement the same thing

pascalkuthe avatar Feb 24 '24 21:02 pascalkuthe

I wonder if this is quite the right command tough. kacuone has a more generic :set-register typable command. That could be combined with command expansion (where I think being able to expand to registers would be quite useful) to implement the same thing

To be clear, one would do this in kakoune by typing :set_register <destination_register> %reg{source_register} right? If so, I think this is super versatile but I think it may be less intuitive than an explicit copy command.

uek-1 avatar Feb 24 '24 22:02 uek-1

I think a :set-register command could also be useful but it might be complicated to use it to copy between registers, for example if you're copying a set of selections from one register to another

the-mikedavis avatar Feb 27 '24 00:02 the-mikedavis

We discussed this briefly: I don't think a typable:copy-register command carrys its weight over :set-register %reg{..} but an interactive version bound to a key that would prompt the user which registers to copy from/to would.be worth adding

pascalkuthe avatar Feb 27 '24 01:02 pascalkuthe

Should we close https://github.com/helix-editor/helix/pull/7494 in favor of this?

kirawi avatar Apr 17 '24 14:04 kirawi

Should we close #7494 in favor of this?

No we want both set-register so you can combine it with commands expansion (and use it in keymaps) and an interactive command to copy between registers.

pascalkuthe avatar Apr 17 '24 14:04 pascalkuthe

Superseded by 066e938ba083c0259ff411b681eca7bad30980df

the-mikedavis avatar Feb 03 '25 01:02 the-mikedavis