On 12/02/10 18:48, Gary Johnson wrote:
On 2010-02-12, Tony Mechelynck wrote:

If you worry that comment leaders are inserted while pasting, then you
should use ":set paste" (see :help 'paste') temporarily when pasting
(and ":set nopaste" when you're finished pasting and start typing
again), and it won't happen anymore IIUC. Or else, you could use gvim
instead of Console Vim, because gvim can tell the difference between
typing and pasting, and it will do the right thing even if 'paste' isn't
set.

"Console Vim", as you call it, can also tell the difference between
typing and pasting if it is compiled with the right features and is
run in an appropriate terminal.  I paste formatted text into my vim
running in an xterm all the time.  I don't know for sure what
features of either are required to do that; for me, it just works.

Regards,
Gary



IIUC, it may depend on the terminal, and/or on whether middle-clicking in the terminal triggers "Vim paste" or "terminal-emulator paste". The problem is that, in some terminals, Vim may mistake "terminal paste" for "user typing" and apply on-the-go formatting. See the 2nd paragraph under :help 'paste':

        Setting this option is useful when using Vim in a terminal, where Vim
        cannot distinguish between typed text and pasted text.  In the GUI, Vim
        knows about pasting and will mostly do the right thing without 'paste'
        being set.  The same is true for a terminal where Vim handles the
        mouse clicks itself.

IIRC, the OP invoked Vim as "vi", which, on many Linux distros, means a minimum-features version of Vim.


Best regards,
Tony.
--
Women are probably the main cause of free software starvation.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to