kndndrj / nvim-dbee

Interactive database client for neovim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change which register is used for "yank"

willruggiano opened this issue · comments

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.

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 :)

yank_register.go

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

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.

Works great! Thanks!