On 02/05/2011 06:52 PM, Michael(Xi Zhang) wrote:
Every time after I enter 'V' mode to select multiple lines
and press 'Y', the cursor will go back to the first line of
the selected block.
I have to move the cursor to the end of the block and paste
it.
Is there a way to change the VIM's behavior, move the cursor
to the end of the block?
While I don't know of any option to change the behavior, you can
try any of the following:
1) If you're using line-wise visual mode, pasting above the start
of your yank produces the same content as pasting below the end
of your visual-range. It will leave your cursor between the two
duplicate bits, but if you need to, you can use the following to
jump to the bottom of the original text (now below the pasted text)
2) You can use the ">" mark to jump to the end of the visual
selection:
`>
as detailed at
:help '>
3) in combination with #2, you can map it something like
:vnoremap Y Y`>
so that yanking puts you at the end of the selection.
Hope this gives you some ideas to work with,
-tim
--
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