vim-nixhash icon indicating copy to clipboard operation
vim-nixhash copied to clipboard

Replace hash binding

Open nyarly opened this issue 3 years ago • 2 comments

<m-h> is handy, but I still have to think so much! Couldn't there be a binding to replace a motion with a corresponding hash? e.g. if I <Leader>Hi", and there's a sha256-... there, I want a sha256 prefixed replacement and so on. Appropriate lengths could be chosen, as well.

Related, it's likely nicer to expose the mappings as plug mappings, with defaults so that setting the "don't map keys" config doesn't mean I can't remap how I'd like.

nyarly avatar Feb 11 '22 23:02 nyarly

is handy, but I still have to think so much! Couldn't there be a binding to replace a motion with a corresponding hash? e.g. if I <Leader>Hi", and there's a sha256-... there, I want a sha256 prefixed replacement and so on. Appropriate lengths could be chosen, as well.

could you elaborate on your use case?

I only see two:

  • writing a hash from scratch, and I think m-h does it well
  • invalidating a hash, and then r0 is shorter

Regarding plug mappings, could you point me to doc? I'm not very familiar with them.

symphorien avatar Feb 12 '22 12:02 symphorien

I added plug bindings on master.

symphorien avatar Jan 09 '23 20:01 symphorien