Re: ctrl-v after a o command

2006-09-22 Thread Benji Fisher
On Thu, Sep 21, 2006 at 07:37:47PM -0700, lll wrote:
 
 Hello:
 I'm using VIM 7.0 in windows OS.
 Whenever I paste something using ctrl-v after typing o to insert on next
 line, the pasted string would not follow the indentation of the curser.  It
 would paste the string from the beginning of the line.
 This is a new behavior compare to version 6.2.  Does anybody know how to set
 the behavior back so ctrl-v will paste the string right where the curser is?

 I think this is a problem that has already been fixed.  I assume
you are using mswin.vim, which maps C-v in Insert mode to do a paste.
Try

:imap C-v

When I do this, I get

i  C-VxBSEsc:call paste#Paste()CRgi

If you are missing the xBS at the beginning of the mapping, that
would explain the problem.  You can fix it by getting the updated files

$VIMRUNTIME/mswin.vim
$VIMRUNTIME/autoload/paste.vim

HTH --Benji Fisher


Re: ctrl-v after a o command

2006-09-22 Thread lll

Thanks Benji.  This is the problem I'm having.
Adding xBS solves the problem.





Benji Fisher wrote:
 
 On Thu, Sep 21, 2006 at 07:37:47PM -0700, lll wrote:
 
 Hello:
 I'm using VIM 7.0 in windows OS.
 Whenever I paste something using ctrl-v after typing o to insert on
 next
 line, the pasted string would not follow the indentation of the curser. 
 It
 would paste the string from the beginning of the line.
 This is a new behavior compare to version 6.2.  Does anybody know how to
 set
 the behavior back so ctrl-v will paste the string right where the curser
 is?
 
  I think this is a problem that has already been fixed.  I assume
 you are using mswin.vim, which maps C-v in Insert mode to do a paste.
 Try
 
 :imap C-v
 
 When I do this, I get
 
 i  C-VxBSEsc:call paste#Paste()CRgi
 
 If you are missing the xBS at the beginning of the mapping, that
 would explain the problem.  You can fix it by getting the updated files
 
 $VIMRUNTIME/mswin.vim
 $VIMRUNTIME/autoload/paste.vim
 
 HTH   --Benji Fisher
 
 

-- 
View this message in context: 
http://www.nabble.com/ctrl-v-after-a-%22o%22-command-tf2315601.html#a6456099
Sent from the Vim - General mailing list archive at Nabble.com.



Re: ctrl-v after a o command

2006-09-21 Thread A.J.Mechelynck

lll wrote:

Hello:
I'm using VIM 7.0 in windows OS.
Whenever I paste something using ctrl-v after typing o to insert on next
line, the pasted string would not follow the indentation of the curser.  It
would paste the string from the beginning of the line.
This is a new behavior compare to version 6.2.  Does anybody know how to set
the behavior back so ctrl-v will paste the string right where the curser is?

Thanks...


Pasting with Ctrl-V is, in my opinion, anti-Vim. To paste from the clipboard, 
use one of the following methods:


	+p or +P in Normal mode (p pastes after the cursor, P before). Note that 
the paste will be linewise (before or after the cursor line) if the clipboard 
content ends with a linefeed, characterwise (before or after the cursor 
character) otherwise.


^R+ in Insert/Replace or Command-line modes (where ^R means hit 
Ctrl+R)

:[number]put +  to paste after line [number]

:$put + to paste after the last line

:0put + to paste before line 1

	the Edit - Paste menu is equivalent to +gP which pastes before the cursor 
and leaves the cursor after the pasted text.




Once you're familiar with them (and with other true Vim commands), you will 
be able to suppress the sourcing of mswin.vim, a script which causes lots of 
people no end of trouble and blocks them from using the full power of Vim, on 
the pretence of making their life easy.



Best regards,
Tony.