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

vimdiff

Expand Messages
  • Coen Engelbarts
    A quote from diff.txt: vimdiff -o file1 file2 [file3] In each of the edited files these options are set: diff on scrollbind on scrollopt includes hor
    Message 1 of 4 , Nov 2, 2001
    • 0 Attachment
      A quote from diff.txt:

      vimdiff -o file1 file2 [file3]

      In each of the edited files these options are set:

      'diff' on
      'scrollbind' on
      'scrollopt' includes "hor"
      'wrap' off
      'foldmethod' "diff"
      'foldcolumn' 2

      I think it would be a really good idea to add 'number" to that little list.
      Can I do that myself with some config setting? if so, how?

      Thanks in advance


      Coen
    • Piet Delport
      ... I, for one, prefer the current default of leaving it off. :-) ... Adapted from the example at the top of diff.txt: if &diff set number endif A more
      Message 2 of 4 , Nov 3, 2001
      • 0 Attachment
        On Fri, 02 Nov 2001 at 17:04:02 +0100, Coen Engelbarts wrote:
        > A quote from diff.txt:
        >
        > vimdiff -o file1 file2 [file3]
        >
        > In each of the edited files these options are set:
        >
        > 'diff' on
        > 'scrollbind' on
        > 'scrollopt' includes "hor"
        > 'wrap' off
        > 'foldmethod' "diff"
        > 'foldcolumn' 2
        >
        > I think it would be a really good idea to add 'number" to that little
        > list.

        I, for one, prefer the current default of leaving it off. :-)

        > Can I do that myself with some config setting? if so, how?

        Adapted from the example at the top of diff.txt:

        if &diff
        set number
        endif

        A more flexible way would be something like:

        autocmd BufNewFile,BufRead * if &diff | setlocal nu | endif

        which does the check every time a file is created/loaded, and only sets
        the 'numbers' option locally.

        --
        Piet Delport <siberiyan@...>
        Today's subliminal thought is:
      Your message has been successfully submitted and would be delivered to recipients shortly.