public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* Re: [gentoo-user] Re: Paste into vim keeping indention or original?
  @ 2011-01-27 20:53 99%     ` YoYo Siska
  0 siblings, 0 replies; 1+ results
From: YoYo Siska @ 2011-01-27 20:53 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
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:53 99%     ` YoYo Siska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox