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

Re: Text wrapping / reflowing - two questions.

Expand Messages
  • cga2000
    ... Not that I know of. ... and vim didn t seem to like it.. I then did a ... and formatoptions is apparently set to: formatoptions=tcql .. looks very
    Message 1 of 11 , Apr 30, 2006
    • 0 Attachment
      Thus spake Eric Arnold on Mon, May 01, 2006 at 12:19:41AM -0600 or thereabouts: <eric.p.arnold@...> [2006-05-01 02:38]:
      > Do you have these set?
      >
      > setlocal formatoptions+=bcroqan2t " better without w
      > setlocal linebreak
      >

      Not that I know of.

      I tried:

      :set ?formatoptions
      :set ?formatoptions+
      :setlocal ?formatoptions .. etc.

      and vim didn't seem to like it..

      I then did a

      :set

      and formatoptions is apparently set to:

      formatoptions=tcql

      .. looks very different from what you have above?

      I'll look into it further later today since it's really getting late.

      btw, is there any way I can direct vim to write the output of a query
      such as ':set' or ':ve' directly to the buffer? That would come in
      handy when someone asks me for more info as to how my system is
      configured.

      Thanks,

      cga
    • Gary Johnson
      ... and paste register a where you want it. Gary -- Gary Johnson | Agilent Technologies garyjohn@spk.agilent.com | Wireless Division
      Message 2 of 11 , May 1 12:06 AM
      • 0 Attachment
        On 2006-05-01, cga2000 <cga2000@...> wrote:

        > btw, is there any way I can direct vim to write the output of a query
        > such as ':set' or ':ve' directly to the buffer? That would come in
        > handy when someone asks me for more info as to how my system is
        > configured.

        :help redir

        Example:

        :redir @a
        :set
        :redir END

        and paste register a where you want it.

        Gary

        --
        Gary Johnson | Agilent Technologies
        garyjohn@... | Wireless Division
        | Spokane, Washington, USA
      • Eric Arnold
        ... Actually, you should look at the above options, and see if you want all of them. These are what I use for when I m writing text (instead of code). ... set
        Message 3 of 11 , May 1 12:13 AM
        • 0 Attachment
          On 5/1/06, cga2000 <cga2000@...> wrote:
          > Thus spake Eric Arnold on Mon, May 01, 2006 at 12:19:41AM -0600 or thereabouts: <eric.p.arnold@...> [2006-05-01 02:38]:
          > > Do you have these set?
          > >
          > > setlocal formatoptions+=bcroqan2t " better without w

          Actually, you should look at the above options, and see if you want
          all of them. These are what I use for when I'm writing text (instead
          of code).

          > > setlocal linebreak
          > >
          >
          > Not that I know of.
          >
          > I tried:
          >
          > :set ?formatoptions
          > :set ?formatoptions+
          > :setlocal ?formatoptions .. etc.

          set formatoptions?
          set fo?

          You've got a dyslexic "?" :-)


          > and vim didn't seem to like it..
          >
          > I then did a
          >
          > :set
          >
          > and formatoptions is apparently set to:
          >
          > formatoptions=tcql
          >
          > .. looks very different from what you have above?

          Right. See:

          :help fo-table

          which describes that each of the letters means. Pay particular
          attention to "a" and "w". I got tired of "w", so I stopped using it,
          but you might want it.


          > I'll look into it further later today since it's really getting late.
          >
          > btw, is there any way I can direct vim to write the output of a query
          > such as ':set' or ':ve' directly to the buffer? That would come in
          > handy when someone asks me for more info as to how my system is
          > configured.

          :redir @a>

          do stuff, and when done

          :redir end

          Then you have everything in register "a", and can paste it where ever.

          I'm working on a script right now which automatically transfers
          everything to a regular buffer window. I haven't released it yet. If
          you're interested, I can send it.
        • Eric Arnold
          ... I think you need :redir @a or is there some kinda shortcut?
          Message 4 of 11 , May 1 12:15 AM
          • 0 Attachment
            On 5/1/06, Gary Johnson <garyjohn@...> wrote:
            > On 2006-05-01, cga2000 <cga2000@...> wrote:
            >
            > > btw, is there any way I can direct vim to write the output of a query
            > > such as ':set' or ':ve' directly to the buffer? That would come in
            > > handy when someone asks me for more info as to how my system is
            > > configured.
            >
            > :help redir
            >
            > Example:
            >
            > :redir @a

            I think you need :redir @a> or is there some kinda shortcut?

            > :set
            > :redir END
            >
            > and paste register a where you want it.
            >
            > Gary
            >
            > --
            > Gary Johnson | Agilent Technologies
            > garyjohn@... | Wireless Division
            > | Spokane, Washington, USA
            >
          • Gary Johnson
            ... The at the end is new for 7.0. I don t know why it was added. The original syntax didn t have the and 7.0 accepts either. Gary -- Gary Johnson
            Message 5 of 11 , May 1 1:13 AM
            • 0 Attachment
              On 2006-05-01, Eric Arnold <eric.p.arnold@...> wrote:
              > On 5/1/06, Gary Johnson <garyjohn@...> wrote:
              > > On 2006-05-01, cga2000 <cga2000@...> wrote:
              > >
              > > > btw, is there any way I can direct vim to write the output of a query
              > > > such as ':set' or ':ve' directly to the buffer? That would come in
              > > > handy when someone asks me for more info as to how my system is
              > > > configured.
              > >
              > > :help redir
              > >
              > > Example:
              > >
              > > :redir @a
              >
              > I think you need :redir @a> or is there some kinda shortcut?

              The '>' at the end is new for 7.0. I don't know why it was added.
              The original syntax didn't have the '>' and 7.0 accepts either.

              Gary

              --
              Gary Johnson | Agilent Technologies
              garyjohn@... | Wireless Division
              | Spokane, Washington, USA
            • Eric Arnold
              ... How about that. I ve been using the beta long enough to forget how the released version works.
              Message 6 of 11 , May 1 1:31 AM
              • 0 Attachment
                On 5/1/06, Gary Johnson <garyjohn@...> wrote:
                > On 2006-05-01, Eric Arnold <eric.p.arnold@...> wrote:
                > > On 5/1/06, Gary Johnson <garyjohn@...> wrote:
                > > > On 2006-05-01, cga2000 <cga2000@...> wrote:
                > > >
                > > > > btw, is there any way I can direct vim to write the output of a query
                > > > > such as ':set' or ':ve' directly to the buffer? That would come in
                > > > > handy when someone asks me for more info as to how my system is
                > > > > configured.
                > > >
                > > > :help redir
                > > >
                > > > Example:
                > > >
                > > > :redir @a
                > >
                > > I think you need :redir @a> or is there some kinda shortcut?
                >
                > The '>' at the end is new for 7.0. I don't know why it was added.
                > The original syntax didn't have the '>' and 7.0 accepts either.
                >

                How about that. I've been using the beta long enough to forget how
                the released version works.
              • Yegappan Lakshmanan
                Hi, ... As explained in the help for :redir , for backward compatibility, ... contents of the register if its name is given uppercase {A-Z}. For backward
                Message 7 of 11 , May 1 9:42 AM
                • 0 Attachment
                  Hi,

                  On 5/1/06, Gary Johnson <garyjohn@...> wrote:
                  > > >
                  > > > > btw, is there any way I can direct vim to write the output of a query
                  > > > > such as ':set' or ':ve' directly to the buffer? That would come in
                  > > > > handy when someone asks me for more info as to how my system is
                  > > > > configured.
                  > > >
                  > > > :help redir
                  > > >
                  > > > Example:
                  > > >
                  > > > :redir @a
                  > >
                  > > I think you need :redir @a> or is there some kinda shortcut?
                  >
                  > The '>' at the end is new for 7.0. I don't know why it was added.
                  > The original syntax didn't have the '>' and 7.0 accepts either.
                  >

                  As explained in the help for ":redir ", for backward compatibility,
                  the > after the register name can be omitted:

                  -----------------------------------------------------------------------------------------------
                  :redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the
                  contents of the register if its name is given
                  uppercase {A-Z}. For backward compatibility, the ">"
                  after the register name can be omitted. {not in Vi}
                  -----------------------------------------------------------------------------------------------

                  In Vim7, you can append the command output to a register (lower-case
                  register name) using the following command:

                  :redir @{a-z}>>

                  You can also redirect output to a variable using:

                  :redir => {variable}
                  :redir =>> {variable}

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