fx icon indicating copy to clipboard operation
fx copied to clipboard

[feature] Add ability to capture selected value to clipboard

Open ditsuke opened this issue 3 years ago • 7 comments

What

Ability to copy selected value to keyboard

Why

Useful as a quick way to extract some value from JSON and work with it without using a mouse to copy.

History

Previously requested in #69.

ditsuke avatar May 29 '22 00:05 ditsuke

This feature would be highly appreciated.

banjo avatar Jun 02 '22 08:06 banjo

What key to bind?) c?

antonmedv avatar Jun 02 '22 08:06 antonmedv

cc - copy content

cp - copy path

antonmedv avatar Jun 02 '22 08:06 antonmedv

That sounds good. One example could be.

ck - copy key cv - copy value (or cp - copy content) cp - copy path

banjo avatar Jun 02 '22 08:06 banjo

That sounds good. One example could be.

ck - copy key cv - copy value (or cp - copy content) cp - copy path

What do you about the same commands but yank based? yk, yv, yp. That looks familiar to those who use vim, tmux and etc.

4l1fe avatar Jul 13 '22 19:07 4l1fe

What defaults for vim?

antonmedv avatar Jul 13 '22 21:07 antonmedv

What defaults for vim?

Neovim copy Kakoune copy

4l1fe avatar Jul 15 '22 18:07 4l1fe

Just an idea,

y - yank key yy - yank value Y - yank path

public-rant avatar Sep 27 '22 21:09 public-rant

Right now I'm having to result to using Tmux to copy whatever I have in fx, but this would be super nice to have. I'm considering learning some Go just so that this can be added in 😄

waydegilliam avatar Sep 29 '22 18:09 waydegilliam

What do you about the same commands but yank based? yk, yv, yp.

Lets do this way.

antonmedv avatar Sep 29 '22 19:09 antonmedv

What do you about the same commands but yank based? yk, yv, yp.

Lets do this way.

I like them! How about with yy defaulting to the value?

ditsuke avatar Sep 30 '22 03:09 ditsuke

Why yy to value?)

antonmedv avatar Sep 30 '22 06:09 antonmedv

Why yy to value?)

yy yanks the current line in vim. Bringing over the idiom to fx, it should be handy that yy yanks the value considering it the most common use case.

ditsuke avatar Oct 01 '22 05:10 ditsuke

Why yy to value?)

yy yanks the current line in vim. Bringing over the idiom to fx, it should be handy that yy yanks the value considering it the most common use case.

This was exactly my thinking 😀

public-rant avatar Oct 01 '22 10:10 public-rant

Done!

Keys are yy yk yp.

antonmedv avatar Sep 19 '23 08:09 antonmedv