Gentoo Archives: gentoo-user

From: YoYo Siska <yoyo@××××××.sk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Paste into vim keeping indention or original?
Date: Thu, 27 Jan 2011 20:55:36
Message-Id: 20110127205345.GA22926@ksp.sk
In Reply to: Re: [gentoo-user] Re: Paste into vim keeping indention or original? by Mike Gilbert
1 On Thu, Jan 27, 2011 at 02:28:47PM -0500, Mike Gilbert wrote:
2 > On Thu, Jan 27, 2011 at 2:22 PM, Mark Knecht <markknecht@×××××.com> wrote:
3 > > I solved it by creating a .vimrc file and putting
4 > >
5 > > set pastetoggle=<F2>
6 >
7 > Running :set paste will do the job as well if you don't want to assign
8 > a hot key for it.
9
10 BTW, if
11 - vim has access to X (you run it on your local machine or from
12 ssh -X or something similar)
13 - is compiled with X support (check with vim --version | grep +X11)
14 - and you :set mouse=a
15 then you can paste by middle clicking in vim (not shift-middle click),
16 which should paste the text as is...
17
18 The difference is that with shift-middle click, or with vim that cannot
19 talk to X, the terminal sends the selected text to vim as normal input
20 (as if you would type it) and thus its get indented/formated/etc..
21
22 If you have mouse=a set and vim can talk to X, when you middle click
23 it will ask X for the selection and insert it as is without any
24 formatting
25
26 yoyo

Replies

Subject Author
Re: [gentoo-user] Re: Paste into vim keeping indention or original? Bill Longman <bill.longman@×××××.com>