Loading ...
Sorry, an error occurred while loading the content.
 

Re: Pasting while keeping an indent level

Expand Messages
  • Brian Clark
    ... Yes, I sure am. I ve also used strace to figure out which files are being read, and I see no other formatoptions being set. I guess I ll put this on the
    Message 1 of 15 , Oct 29, 2005
      On Sat, Oct 29, 2005 at 07:14:25PM +0100, Chris Allen wrote:

      > On 29/10/05, Brian Clark <brian+vim@...> wrote:
      > > Chris, this is very odd, but I just noticed that in a console vim a
      > > regular paste (clicked mouse wheel or <S-Ins>) acts exactly like I'd
      > > like gvim to act. If I indent, then paste a block of text, every line is
      > > indented perfectly.

      > What you have spotted there is a difference between what the two
      > applications can see. Vim on the console can only see incoming text
      > (the terminal emulator handles the paste event and sends characters),
      > and it responds as if you had typed it. GVim can see that it is
      > receiving a paste and will use the literal formatting of your text,
      > within reason.

      > > In both gvim and vim, if I :set formatoptions, it displays:

      > > formatoptions=tcq

      > Are you making sure to hit tab before pasting in GVim? If so then
      > I've no idea why it does not do what you want.

      Yes, I sure am. I've also used strace to figure out which files are
      being read, and I see no other formatoptions being set. I guess I'll
      put this on the back burner and figure it out later. Thank you for your
      suggestions.

      --
      Brian Clark
    Your message has been successfully submitted and would be delivered to recipients shortly.