wasavi
wasavi copied to clipboard
Insert mode mapping for clipboard paste
I'd really like to have Ctrl-V work for pasting from the clipboard in insert mode.
Having to press:
-
Escape
-
"*p
-
a
is tedious.
How do I create an insert mode mapping for Ctrl-V?
I tried to use:
map! <C-V> <esc>"*pa
But pasting inserts a newline, the pasted text, then another newline. Perhaps this is related to #163... or am I doing it wrong?
wasavi can paste register contents by pressing Ctrl+R
<register name>
in input mode.
So Ctrl+R
*
pastes clipboard contents.
It is the same as vim!
@akahuku You're correct, although what's also possible in normal Vim is to use the system clipboard as the default register, which gives you yank (y
) and paste (p
) "integrated" with the desktop environment, which in turn is very nice :) And I use that, but I'm aware that some people don't prefer it.
So would putting set clipboard=unnamedplus
in wasavi do anything? Is that feature implemented?
Cause it would make this plugin (I'm just starting to use it) be very cool. But even now it's cool. Hell, I'm writing this note in it :D Together with Vimium they're almost perfect.
Ist there a known way to get <C-v>
or <C-V>
to work?
You can now just use map! <c-v> <c-r>*
Although I don't recommend it - it means you won't be able to insert utf-8 characters with <c-v>u
, since you'll cover over the special insert mode.
RGD2: I mapped to <c-V> (ctrl + shift + v) and that worked great and doesn't interfere with the native