Closed debdeepbh closed 7 years ago
You don't integrate Vim with the system clipboard? set clipboard=unnamed
and try CTRL_R *
.
Tried it and didn't work. I am able to paste the code in a typical vim insert mode using Ctrl_R *, Ctrl_R +, Ctrl_R " etc. I can paste in a typical command line (:) also. But in the command line area of Calendar.vim where is says "... CODE:" I cannot paste any of the buffers.
I am unable to paste the code in the command line. For some reason, it only pastes the first character.
I can't still understand what's going on. OS's clipboard pasting (c-v) should work on many environment and terminals.
If it helps, I am attaching a gif. Here, I am using lxterminal with a gui copy-pasting feature. Notice how pasting works everywhere except in the input area of code where only the first character shows up.
Can you try with the following procedure?
vim -u NONE
:echo input('')
Edit->Paste
Here's my screenshot.
If I follow your procedure I can paste properly in the input field.
calendar.vim also uses input
here https://github.com/itchyny/calendar.vim/blob/6cf60f08/autoload/calendar/google/client.vim#L53. I've got confused... Is it related to the multiline text?
let g:text = input("foo\nbar\nCODE:")
CTRL_R *
echo g:text
I tried this and it properly outputs the value of the global variable 'text'.
For the time being, I'm replacing https://github.com/itchyny/calendar.vim/blob/6cf60f08/autoload/calendar/google/client.vim#L53 by
let code = 'my_actual_code_here_in_plaintext'
temporarily to make it work and revert it back after the data from google are downloaded.
I think it's a bug of the terminal but it's hard for me to reproduce and fix the problem.
So I've got the exact same issue, clipboard is shared w/ OS, I'm on OSX, using iterm2 (also tried built in terminal), both just paste the first character of the code. Is there a file/config I can drop the code into?
What is your version of Vim? Can you abort the CODE:
prompt with <C-c>
?
I'm on Vim 8.0
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 25 2016 08:56:17)
MacOS X (unix) version
and yes, Ctrl-C totally gets me out of the CODE prompt.
I think I've fixed this issue.
Being able to reproduce with iterm2 and neovim
After running for the first time with google calendar on, I'm unable to copy the link from vim command line with mouse. I'm using xterm and highlighting text from vim command line is not possible. However, I can use gvim to copy easily. Even with gvim, I am unable to paste the code in the command line. For some reason, it only pastes the first character. Even Crtl_R" pastes only the first character of the code. In what other ways can I paste the code in the command line? Maybe I can manually paste the code in some config file or a terminal-based (outside vim) input field?