On Fri, Feb 12, 2010 at 1:10 PM, Tony Mechelynck <[email protected]> wrote: > 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.
I think it just requires +xterm_clipboard and +mouse, :set mouse=n (at least) and an active connection to the x server. It could also be done without any of those features using bracketed paste mode, but I don't believe that vim supports that yet. > 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 In all terminals, actually. If the paste comes from the terminal emulator it's indistinguishable from user typing, except when the terminal supports (and the application has enabled) bracketed paste mode. As far as I know, no patches to add bracketed paste mode support to vim have ever been accepted. > typing" and apply on-the-go formatting. > IIRC, the OP invoked Vim as "vi", which, on many Linux distros, means a > minimum-features version of Vim. True, but if he has access to gvim, he has a terminal vim with enough features for all of this - he just needs to launch "gvim -v", or symlink gvim to vim, or alias gvim=vim. If I were him, I'd find these solutions preferable to changing my workflow to include a gui vim. ~Matt -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php
