From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PiYsS-0003vG-6C for garchives@archives.gentoo.org; Thu, 27 Jan 2011 20:55:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E39FE0AF4; Thu, 27 Jan 2011 20:53:46 +0000 (UTC) Received: from ksp.sk (element.ksp.sk [158.195.16.154]) by pigeon.gentoo.org (Postfix) with ESMTP id 2CA2FE0AF4 for ; Thu, 27 Jan 2011 20:53:46 +0000 (UTC) Received: by ksp.sk (Postfix, from userid 1004) id 76CE64C19E; Thu, 27 Jan 2011 21:53:45 +0100 (CET) Date: Thu, 27 Jan 2011 21:53:45 +0100 From: YoYo Siska To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: Paste into vim keeping indention or original? Message-ID: <20110127205345.GA22926@ksp.sk> References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-YoYo: 47 X-Exotic-Header-Data: 47/2 User-Agent: Mutt/1.5.20 (2009-06-14) X-Archives-Salt: X-Archives-Hash: 09cdb9e196f038a0c7e302dad59295a8 On Thu, Jan 27, 2011 at 02:28:47PM -0500, Mike Gilbert wrote: > On Thu, Jan 27, 2011 at 2:22 PM, Mark Knecht wrote: > > I solved it by creating a .vimrc file and putting > > > > set pastetoggle= > > Running :set paste will do the job as well if you don't want to assign > a hot key for it. BTW, if - vim has access to X (you run it on your local machine or from ssh -X or something similar) - is compiled with X support (check with vim --version | grep +X11) - and you :set mouse=a then you can paste by middle clicking in vim (not shift-middle click), which should paste the text as is... The difference is that with shift-middle click, or with vim that cannot talk to X, the terminal sends the selected text to vim as normal input (as if you would type it) and thus its get indented/formated/etc.. If you have mouse=a set and vim can talk to X, when you middle click it will ask X for the selection and insert it as is without any formatting yoyo