vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] turn off cindent?


From: Paul Fox
Subject: Re: [vile] turn off cindent?
Date: Wed, 22 Jun 2016 17:01:58 -0400

On Wed, Jun 22, 2016 at 03:48:58PM -0400, address@hidden wrote:
 > I don't always use vile's copy-n-paste to add lines of code to a file.
 > Sometimes I use the mouse to copy from one window and paste into another.
 > When I do this, cindent (and/or autoindent) comes into play and
 > makes my code look like this:
 > 
 >     line_of_code;
 >     line_of_code;
 >     line_of_code;
 >     line_of_code;
 >         if (more)
 >             {
 >                     line_of_code;
 >                           line_of_code;
 >                                 line_of_code;
 >                                       line_of_code;
 >                                             line_of_code;
 >                                                 }
 > 
 > I'm trying to turn off autoindent with these two commands
 > :set noautoindent
 > :set nocindent

there are commands specifically intended to help with your use case.
from the help file:

   ^A-i
           Like their 'i', 'o', and 'O' counterparts, but any autoindent

   ^A-o
           or cmode setting is ignored for the duration of this insert.

   ^A-O
           These are most useful when pre-formatted text is being pasted, as
           when using a mouse.


the formatting is messed up.  that should look something like this:

   ^A-i
   ^A-o
   ^A-O    Like their 'i', 'o', and 'O' counterparts, but any autoindent
           or cmode setting is ignored for the duration of this insert.
           These are most useful when pre-formatted text is being pasted, as
           when using a mouse.

paul
=----------------------
 paul fox, address@hidden (arlington, ma, where it's 72.5 degrees)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]