kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
617 stars 40 forks source link

Change which register is used for "yank" #45

Closed willruggiano closed 6 months ago

willruggiano commented 8 months ago

It looks like dbee is setreg()ing to the unnamed register, but often I will copy the result output so that I can paste it somewhere else (Slack to share with teammates, GitHub gists, etc) and I don't want to do :let @+=@" every time :/

So there's two things:

  1. Configure option to specify which register to use by default when yanking.
  2. Respect the register provided as part of the command sequence: ""yaJ would mimic the current behavior, but I could do "+yaJ to use the selection register.
kndndrj commented 8 months ago

Thanks for the suggestion. I really don't know anymore how I did the yanking (I think it's done on go side).

I'll look into this once I get around to working on this project a bit more :)

willruggiano commented 8 months ago

yank_register.go

Presumably the "" passed to r.vim.Call("setreg", ...) is the register name

kndndrj commented 6 months ago

keymaps should now work if prefixed with the register.

For example "+yaJ should yank as json to + register.

Closing, but feel free to reopen if you think something is missing.

willruggiano commented 6 months ago

Works great! Thanks!