From: YoYo Siska <yoyo@gl.ksp.sk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Paste into vim keeping indention or original?
Date: Thu, 27 Jan 2011 21:53:45 +0100 [thread overview]
Message-ID: <20110127205345.GA22926@ksp.sk> (raw)
In-Reply-To: <AANLkTinWQWRRtvYHstJ7BLFkS4h=CPQFxkX3CDodT7eC@mail.gmail.com>
On Thu, Jan 27, 2011 at 02:28:47PM -0500, Mike Gilbert wrote:
> On Thu, Jan 27, 2011 at 2:22 PM, Mark Knecht <markknecht@gmail.com> wrote:
> > I solved it by creating a .vimrc file and putting
> >
> > set pastetoggle=<F2>
>
> 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
next prev parent reply other threads:[~2011-01-27 20:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 19:07 [gentoo-user] Paste into vim keeping indention or original? Mark Knecht
2011-01-27 19:22 ` [gentoo-user] " Mark Knecht
2011-01-27 19:28 ` Mike Gilbert
2011-01-27 20:11 ` Petri Rosenström
2011-01-27 20:53 ` YoYo Siska [this message]
2011-01-28 17:08 ` Bill Longman
2011-01-28 20:03 ` kashani
2011-01-28 22:42 ` Bill Longman
2011-01-28 20:20 ` David Abbott
2011-01-27 22:38 ` James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110127205345.GA22926@ksp.sk \
--to=yoyo@gl.ksp.sk \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox