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

Re: Border buffer

Expand Messages
  • Benjamin Fritz
    ... I took this to mean when you are wrapping text with :set wrap . I ve found it very annoying myself that all wrapped lines look just like normal lines,
    Message 1 of 10 , Feb 4 8:33 AM
    • 0 Attachment
      On 2/4/08, thomas <micathom@...> wrote:
      >
      > > Is there anyway to set a narrow buffer on either side of my window so the text doesn't wrap exactly on the border?
      >
      > You mean a margin? For the left margin you could use foldcolumn maybe,
      > for the right wrapmargin? Something like that?
      >
      > >
      >

      I took this to mean when you are wrapping text with ":set wrap". I've
      found it very annoying myself that all wrapped lines look just like
      normal lines, and have searched to no avail for a way to visually
      indent the wrapped part of the line or something.

      If this is what you're after, the best solution I've found so far is
      just setting the "linebreak" option after wrap, with ":set wrap
      linebreak". I can then use gj and gk to move over the "visual lines."
      It still leaves much to be desired, though, like that indentation of
      wrapped lines I mentioned I wanted to see.

      The foldcolumn/wrapmargin suggestion is certainly valid for the
      auto-formatted insertion of linebreaks as you type. If this is what
      you're after, wrapmargin or textwidth are the way to go.

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Matt Wozniski
      ... I m no expert on DOS batch files, but for bourne-like shells you would certainly want for i in *.txt; do vim -c wq -r $i ; done Not having the quotes
      Message 2 of 10 , Feb 4 9:05 AM
      • 0 Attachment
        On Feb 4, 2008 9:02 AM, Tim Chase wrote:
        >
        > > Since I already touched most of files I would be presented with the
        > > well known "Found a swap file by the name..." dialogue would appear -
        > > for each file separately. Now 20+ files this is more then annoying I
        > > decided to try the "-r" recovery option.
        > >
        > > Now this worked quite nice - for the first file only. All the other
        > > 19+ files would still present the "Found a swap file by the name..".
        > >
        > > Well I bid the bullet and fought my way thrue all the pop-ups but it
        > > left me with a feeling of "could that not be easier?" - like if "-r"
        > > works for all files from the command line.
        >
        >
        > You might script something in your shell, and with Vim using
        > command-line arguments. Something like the untested:
        >
        > for i in *.txt; do vim -c "wq" -r $i; done
        >
        > which should be fairly close if you have a sh/bash shell, or if
        > you're at a Dos prompt, something like
        >
        > for %f in (*.txt) do @vim -c "wq" -r %f
        >
        > You'll still have the recovery files floating around so you'll
        > want to delete them once you've done what you need.

        I'm no expert on DOS batch files, but for bourne-like shells you would
        certainly want
        for i in *.txt; do vim -c wq -r "$i"; done
        Not having the quotes around $i means that it could be expanded into
        multiple arguments, rather than one, if for instance the filename
        contains a space. Definitely wrong. Otherwise, I agree, this is the
        way I would have gone about this.

        ~Matt

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Karl Anderson
        Thanks Everyone, I am now using set foldcolumn=1 // One column space highlight FoldColumn guibg=#F2D8A6 // Column matches my screen
        Message 3 of 10 , Feb 4 9:34 AM
        • 0 Attachment
          Thanks Everyone,
           
          I am now using
           
          set foldcolumn=1                       // One column space
          highlight FoldColumn guibg=#F2D8A6     // Column matches my screen color
          set lbr                                // For Wrapping
           
          These seem to be working well for me ...
           
          k
           




           "When I gave food to the poor, they called me a saint;
            but when I asked why people are poor, they called me a communist."
          -Brazilian Bishop Don Helder Camara

          "A few are guilty but we are all responsible."
           -Abraham Joshua Heschel

          "We can't go on living like this"
          -Mikhail Gorbachev



          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---

        • thomas
          ... Would showbreak improve the situation? --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For
          Message 4 of 10 , Feb 4 11:27 AM
          • 0 Attachment
            > have searched to no avail for a way to visually
            > indent the wrapped part of the line or something.

            Would showbreak improve the situation?

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Benjamin Fritz
            ... That is exactly what I was looking for, thank you! ... Which makes a wrapped line look like this: This text is a really super long line that is longer than
            Message 5 of 10 , Feb 4 11:40 AM
            • 0 Attachment
              On 2/4/08, thomas <micathom@...> wrote:
              >
              > > have searched to no avail for a way to visually
              > > indent the wrapped part of the line or something.
              >
              > Would showbreak improve the situation?
              >

              That is exactly what I was looking for, thank you!

              Karl, take note...I now have:

              :set wrap linebreak showbreak=>>\ \

              Which makes a wrapped line look like this:

              This text is a really super long line that is longer than a window width and
              >> thus gets wrapped.

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • marc daya
              ... If I might throw my penny into the plate: I didn t know about showbreak (thanks, thomas), but I generally always have set number on. So with set wrap
              Message 6 of 10 , Feb 4 10:18 PM
              • 0 Attachment
                On 04/02/2008, Benjamin Fritz <fritzophrenic@...> wrote:
                >
                > On 2/4/08, thomas <micathom@...> wrote:
                > >
                > > > have searched to no avail for a way to visually
                > > > indent the wrapped part of the line or something.
                > >
                > > Would showbreak improve the situation?
                > >
                >
                > That is exactly what I was looking for, thank you!
                >
                > Karl, take note...I now have:
                >
                > :set wrap linebreak showbreak=>>\ \
                >
                > Which makes a wrapped line look like this:
                >
                > This text is a really super long line that is longer than a window width and
                > >> thus gets wrapped.
                >

                If I might throw my penny into the plate: I didn't know about
                showbreak (thanks, thomas), but I generally always have 'set number'
                on. So with 'set wrap linebreak' text looks like:

                1 This text is really super long line that is longer than a window
                width and thus
                gets wrapped.
                2 This highlights the difference between wrapped lines and new lines.

                So I can see from the line numbers which lines are unbroken.
                .marc

                --
                I reject your reality, and substitute my own.
                --- Adam Savage

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              Your message has been successfully submitted and would be delivered to recipients shortly.