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

Re: long line display in gvimdiff

Expand Messages
  • Peng Yu
    ... Hi I actually mean how to wrap around long lines in gvimdiff. Thanks, Peng
    Message 1 of 8 , Nov 1, 2006
    • 0 Attachment
      On 11/1/06, Peng Yu <pengyu.ut@...> wrote:
      > Hi,
      >
      > It seems that longs line shown in gvimdiff would be broken. I have to
      > move the cursor to the end of the long to read it. I'm wondering how
      > to break lines like the norm gvim does.
      >
      > Thanks,
      > Peng

      Hi

      I actually mean how to wrap around long lines in gvimdiff.

      Thanks,
      Peng
    • Tim Chase
      ... I would suggest ... or ... as they seem to work fine for me in diffmode. It should apply on a per-window basis, so you may have to execute it in each diff
      Message 2 of 8 , Nov 1, 2006
      • 0 Attachment
        > I actually mean how to wrap around long lines in gvimdiff.

        I would suggest

        :set wrap
        or
        :set nowrap

        as they seem to work fine for me in diffmode. It should apply on
        a per-window basis, so you may have to execute it in each diff
        window.

        -tim
      • Dmitriy Yamkovoy
        ... Or if you re feeling lazy, ... These enable or disable wrapping for all windows in the current tab. -Dmitriy
        Message 3 of 8 , Nov 1, 2006
        • 0 Attachment
          > It should apply on
          > a per-window basis, so you may have to execute it in each diff
          > window.
          >

          Or if you're feeling lazy,

          :windo set wrap
          :windo set nowrap

          These enable or disable wrapping for all windows in the current tab.

          -Dmitriy
        • Tim Chase
          ... If you only have the two diff windows open, this is about as efficient as control+W control+W at colon to change windows and re-execute the last-issued
          Message 4 of 8 , Nov 1, 2006
          • 0 Attachment
            >> It should apply on
            >> a per-window basis, so you may have to execute it in each diff
            >> window.
            >
            > Or if you're feeling lazy,
            >
            > :windo set wrap
            > :windo set nowrap


            If you only have the two diff windows open, this is about as
            efficient as "control+W control+W at colon" to change windows and
            re-execute the last-issued commandline. Also, less finger
            dancing and a bit more readable.

            However, if you have multiple windows open, and only a subset of
            them are "diff" windows, the "windo" solution may effect windows
            that you don't want it to.

            But yes, this is helpful for easily changing a settings in all
            the open windows.

            -tim
          • Dmitriy Yamkovoy
            I didn t know about @:, thanks! -Dmitriy
            Message 5 of 8 , Nov 1, 2006
            • 0 Attachment
              I didn't know about @:, thanks!

              -Dmitriy

              On 11/1/06, Tim Chase <vim@...> wrote:
              > >> It should apply on
              > >> a per-window basis, so you may have to execute it in each diff
              > >> window.
              > >
              > > Or if you're feeling lazy,
              > >
              > > :windo set wrap
              > > :windo set nowrap
              >
              >
              > If you only have the two diff windows open, this is about as
              > efficient as "control+W control+W at colon" to change windows and
              > re-execute the last-issued commandline. Also, less finger
              > dancing and a bit more readable.
              >
              > However, if you have multiple windows open, and only a subset of
              > them are "diff" windows, the "windo" solution may effect windows
              > that you don't want it to.
              >
              > But yes, this is helpful for easily changing a settings in all
              > the open windows.
              >
              > -tim
              >
              >
              >
            • Tim Chase
              ... It s a very handy thing, though in earlier versions of vim if you had a literal control+M in the last command-line (as entered with a control+V followed by
              Message 6 of 8 , Nov 1, 2006
              • 0 Attachment
                > I didn't know about @:, thanks!

                It's a very handy thing, though in earlier versions of vim if you
                had a literal control+M in the last command-line (as entered with
                a control+V followed by control+M), it would truncate the
                command-line at that point rather than re-issue that last
                command-line. Other control-characters also caused similar problems.

                There was also a second bug regarding commands that operate over
                a range. If you visually select a new range and use @: it would
                make the resulting command

                :'<,'>'<,'>command

                which would choke vim.

                There are workarounds for these older versions (if you need 'em,
                let me know and I'll elaborate).

                However, since they have been fixed (I'm not sure whether it was
                in a late v6.x or only v7), it's an even more regular staple of
                my vim usage. However, it's just something to watch for if you
                use older versions of vim (such as what I have on some of my
                hosting providers that I can't easily upgrade myself).

                -tim
              • Benji Fisher
                ... As long as we are considering easy/efficient/lazy ways to do it, I prefer ... to toggle the setting of wrap . Then I can use @: to change it back. Of
                Message 7 of 8 , Nov 2, 2006
                • 0 Attachment
                  On Wed, Nov 01, 2006 at 09:03:54AM -0500, Dmitriy Yamkovoy wrote:
                  > >It should apply on
                  > >a per-window basis, so you may have to execute it in each diff
                  > >window.
                  > >
                  >
                  > Or if you're feeling lazy,
                  >
                  > :windo set wrap
                  > :windo set nowrap
                  >
                  > These enable or disable wrapping for all windows in the current tab.

                  As long as we are considering easy/efficient/lazy ways to do it, I
                  prefer

                  :windo set wrap!

                  to toggle the setting of 'wrap'. Then I can use @: to change it back.
                  Of course, the same thing works one window at a time without the :windo
                  modifier.

                  As for the problem of affecting non-diff windows, I suggest the
                  following command:

                  " Diffdo <command> applies :command in all windows where 'diff' is set.
                  :command! -nargs=+ -complete=command Diffdo
                  \ windo if &diff <Bar> execute <q-args> <Bar> endif

                  HTH --Benji Fisher
                Your message has been successfully submitted and would be delivered to recipients shortly.