On Friday, January 11, 2013 10:00:37 PM UTC-5, skeept wrote: > On Friday, January 11, 2013 8:32:44 PM UTC-5, Tim Chase wrote: > > On 01/11/13 19:26, skeept wrote: > > > > > If I have something stored in a specific register say register z > > > > > and select something visual then I try to paste over it with "zp > > > > > but this doesn't seem to do anything... > > > > > > > > > > Is there a easy way of accomplishing this? > > > > > > > > This seems peculiar, as you're doing it right. Do you see the same > > > > behavior when you start vim with > > > > > > > > vim -u NONE file.txt > > > > > > > > to eliminate startup scripts/settings? > > > > > > > > Alternatively, I presume you're well aware of the contents, but if > > > > you paste over the selection with the same contents (i.e., if the > > > > contents of the "z" register are the same as what you're pasting > > > > over, it would look like a noop). > > > > > > > > Also, are you using Visual mode (v/V/^V), or are you using the > > > > Selection mode (I never use this, so I can't tell you much about > > > > entering it)? The pasting works in Visual mode, but I don't know > > > > what it does in Selection mode. However you comment that you > > > > "select something in *visual*", so I'm presuming you're doing that > > > > right. > > > > > > > > -tim > > Hi, > > you are right, > > when I do it with vim -u NONE it works perfectly. > So I went checking in my vimrc and I actually have this map there: > > vnoremap p <Esc>:let current_reg = @"<CR>gvs<C-R>=current_reg<CR><Esc> > > So now I will try to replace @" by @z, I think this work better in my case > because I usually specify a register explicitly when I want to copy visually > selected text. >
Would it be possible to define a mapping for p that, when in visual mode checks if I have specified a register (with "a) and in that case pastes the contents of that register, and if not simply pastes a previously specified register? Regards, Jorge -- 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
