fakeclip.neovim icon indicating copy to clipboard operation
fakeclip.neovim copied to clipboard

Syntax error "s:past" does not exists.

Open gramic opened this issue 9 years ago • 6 comments

On line 56 it is:

let s:paste['']= s:past['']

And I believe it should be "paste" with a plus '+' for the map key.

let s:paste['*']= s:paste['+']

Even that I made the above change locally, the plugin didn't do what was expected - to copy to the tmux clipboard buffer.

gramic avatar Jul 27 '15 16:07 gramic

How are you copying to the tmux clipboard?
If you are are running in X, you will need to do "&y to copy to the tmux clipboard, if you don't have X running you can just do y to copy, as long as you have set clipboard+=unnamedplus

Thanks for the report of the typo, that has been fixed. in the latest release.

cazador481 avatar Jul 27 '15 18:07 cazador481

No X is running. It is a docker container with Debian Wheezy running bash, then tmux 1.9a, and inside is running nvim. Inside neovim i did "set clipboard+=unnamedplus", followed by coping with y some rows. Doing ":list-buffers" for tmux, doesn't show any buffer contents. The same with selecting a row in nvim and coping with "&y.

I didn't have any clipboard before, and I did something to stop the error messages that there is no providers. Now I don't remember what. That may be the problem.

Here are two rows from the .nvimlog file:

2015/07/28 08:08:47 [info @ main_loop:558] 4033 - Starting Neovim main loop.                                                                                                                                                                                                          
2015/07/28 08:08:56 [error @ call_set_error:741] 4033 - msgpack-rpc: Channel was closed by the clien

gramic avatar Jul 28 '15 08:07 gramic

I am guessing the problem is that you are running in a docker app. to use the tmux clipboard tmux needs access to the socket pointed to in the ENV variable TMUX. I have never used docker before, so I can only be a sounding board. Is there a way to forward the socket to docker? And set up the env variable before you run nvim?

cazador481 avatar Jul 30 '15 13:07 cazador481

Doing some googling it looks like you can add the following command to the docker call to get things to work -e TMUX=$TMUX
-v $TMUX:$TMUX

Let me know if that works, and I'll put that in a wiki and/or documentation when I get to writing it.

cazador481 avatar Jul 30 '15 13:07 cazador481

Tmux and neovim work all inside the docker container. It is like a virtual machine and everything is inside. So the environment variables you mention should not have any effect.

I will try some more modifications to the plugin, which could make it work.

gramic avatar Jul 31 '15 07:07 gramic

If you don't mind can you make me a docker plugin with nvim and tmux, that way I can try it out, and see if I can reproduce the error?

cazador481 avatar Jul 31 '15 13:07 cazador481