Re: [gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-28 Thread Bill Longman
On 01/28/2011 12:03 PM, kashani wrote: > > You might like one too. > > cmap w!! w !sudo tee % >/dev/null > > When you forget to sudo vi you can use w!! which pipes writing the file > though sudo. You get some term gunk, but it does work. That's what "screen" and PS1 are for

Re: [gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-28 Thread David Abbott
> On 01/27/2011 12:53 PM, YoYo Siska wrote: >> 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 i

Re: [gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-28 Thread kashani
On 1/28/2011 9:08 AM, Bill Longman wrote: On 01/27/2011 12:53 PM, YoYo Siska wrote: 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 c

Re: [gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-28 Thread Bill Longman
On 01/27/2011 12:53 PM, YoYo Siska wrote: > 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

[gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-27 Thread James
Mark Knecht gmail.com> writes: > What is the solution to begin able to paste code I find on the web > into a file in vim and being able to keep the indentation from > changing? Well, if you want to keep it simple, here is what I do: edit /etc/vim/vimrc "set ai " Always set au

Re: [gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-27 Thread YoYo Siska
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, i

Re: [gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-27 Thread Petri Rosenström
On Thu, Jan 27, 2011 at 9:28 PM, 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. > > I usually do a

Re: [gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-27 Thread Mike Gilbert
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.

[gentoo-user] Re: Paste into vim keeping indention or original?

2011-01-27 Thread Mark Knecht
On Thu, Jan 27, 2011 at 11:07 AM, Mark Knecht wrote: > What is the solution to begin able to paste code I find on the web > into a file in vim and being able to keep the indentation from > changing? > > For instance, here's the first few lines of code from a web page: > > #define ARRAYSIZE(x)  (si