[lug] vi/eclipse copy and paste indent issue

Jeff Schroeder jeff at zingstudios.com
Thu Aug 27 11:39:34 MDT 2009


John:

> I'd blame it on space vs tab in eclipse but that's far too extreme to
> be a 4 space vs tab issue. Has anyone run into this problem before
> and/or know what I might be able to do to fix it?

You have autoindenting turned on.  The editor is automatically indenting 
each line X spaces (whatever the line above has) and since you're 
pasting a bunch of spaces on each subsequent line, it just keeps 
indenting more and more.

To turn it off, use

:set noai

It's really nice to have on during coding, so to turn it back on after 
pasting, use

:set ai

HTH,
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20090827/99b496cb/attachment.pgp>


More information about the LUG mailing list