Closed devank4000 closed 1 month ago
Consider using a macro like this:
ya|e|pu|w \!xclip -selection clipboard|b#|se nompt
This will copy the current cursor line to clipboard. Currently there is no way to directly pipe the register to external program, therefore an extra buffer is used.
I realized that doing this through a buffer limits the control of '\n' character since the :w command can only work on lines and not separate parts. I've implemented register pipe feature in 76. You should also check the other new additions in readme. But the gist of it is, you can now use pu \!xclip -selection clipboard
to pipe default register, or do any register you want like this: pu x \!xclip -selection clipboard
.
is there any way to copy to system clipboard directly from vi (special register?)