On 31/12/13 07:55, Diep Pham Van wrote:
> I'm having unexpected result when press Shift-Insert to paste in gvim.
> Instead of paste, gvim inserts '<S-Insert>', vim in a terminal work fine.
>
> I'm using vim 7.4, this is my compile option:
> http://pastebin.com/BJbiuiTL
>
> I've already try with '-u NONE'. If I remember correctly, the
> Shift-Insert paste used to work in the past.
> So, any one has this problem? And how to fix it?
>
Your mailer's User-Agent line (Icedove 17.0.10 for linux x86_64) seems
to imply that, like me, you're on Linux; and indeed, when I hit
Shift-Insert in gvim (Huge GTK2/GNOME2 version) in Insert mode, it
inserts <S-Insert>. In Normal mode I get a beep (which I have customized
to a visual beep).
The help about this key seems to indicate that it is specific to MS-DOS
and Windows versions of Vim. You can get it back, though, with the
following mappings (untested, and this assumes Vim 7.0 or later):
noremap! <S-Insert> <C-R>+
nnoremap <S-Insert> "+gP
snoremap <S-Insert> <Esc>gvc<C-R>+
xnoremap <S-Insert> c<C-R>+<Esc>
These mappings intentionally leave you in Normal mode after using
Shift-Insert in Visual but in Insert mode after using it in Select mode.
If I didn't goof, they all leave the cursor after the inserted text.
There could be an off-by-one error in the xnoremap (Visual but not
Select) mapping. Append an l or a <Right> if it upsets you, but this
might produce an unwanted advance to the next line if you're in
blockwise- or characterwise-visual at the end of a line.
Instead of these mappings, you can of course just insert register +
(which is the clipboard) in the normal way, either with the keyboard
(using key sequences similar to the {rhs}es above) or with the "Edit →
Paste" menu.
I suppose that the fact that it still works in a terminal means that
your terminal is handling it.
Best regards,
Tony.
--
Put another password in,
Bomb it out, then try again.
Try to get past logging in,
We're hacking, hacking, hacking.
Try his first wife's maiden name,
This is more than just a game.
It's real fun, but just the same,
It's hacking, hacking, hacking.
-- To the tune of "Music, Music, Music?"
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Monday, December 30, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment