p vmap in system-wide vimrc
James Vega
jamessan at jamessan.com
Sun Nov 20 02:32:06 UTC 2005
Today I got stung by the very odd (broken?) vmap we have the system-wide
vimrc.
" Make p in Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
I'm not sure why we have that in the shipped vimrc, but it doesn't allow
you to paste from a register when you're in visual mode. It also causes
other strange behavior such as the following:
Make a file with the lines:
123
456
789
Yank the first line, use V to select the 3rd line (last line in the
buffer) and press p. You end up with:
123
123
456
If no one objects, I'm going to remove this from the vimrc, not only
because of this behavior, but because p already does what the comment
says it does.
James
--
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at jamessan.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20051119/f97ae608/attachment.pgp
More information about the pkg-vim-maintainers
mailing list