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

Re: vimsplit: merging files & wishes

Expand Messages
  • Bram Moolenaar
    ... I m glad it s useful. ... That s probably the fold column. This makes it easier to open and close folds, by clicking on the + or - of the fold. For
    Message 1 of 2 , Apr 6, 2001
    • 0 Attachment
      Zdenek Sekera wrote:

      > vimsplit is very impressive, as others noted.

      I'm glad it's useful.

      > Q: I am getting a blank column (well, colored) in col 1,
      > (in both vertical windows), is this the effect of folding?
      > (Didn't use folding yet, no experience)

      That's probably the fold column. This makes it easier to open and close
      folds, by clicking on the "+" or "-" of the fold. For those people who can't
      remember the "zc" and "zo" commands...

      > A few wishes, perhaps:
      >
      > - I find little odd that 'vimdiff f1 f2' defaults to vertical
      > (which I like), but :diffsplit defaults to horizontal, (requires
      > :vert diffsplit ..). I'd make it symetric (simple for simple)

      The reason is that when ":diffsplit" would do a vertical split by default, how
      would you tell it to do a horizontal split?

      I find the vertical split more useful, since you can see the files
      side-by-side. That's why it's the default for "vimdiff".

      > - the filler lines are 'xxxxx'
      > I find that distracting (maybe: too imposing), couldn't
      > we have a possibility to choose the filler char?
      > If we did, what I would choose would be just a blank line
      > (all blanks) and hope this filler line can be colored
      > to something to make clear it is a filler and not a legitimate
      > blank line

      Using a blank line with some coloring would be preferred. Unfortunatly it's
      not always clear what background color a user has set up. Especially in a
      terminal. The color would then possibly be equal to the background color, and
      the filler lines would go unnoticed. For the GUI the problem is that the user
      may change the background color somewhere in his .vimrc or .gvimrc file, after
      the default color for DiffDelete has been selected.

      An alternative could be to use another character. But which? It should be
      different from another character that's used for lines in the file. For
      example, many C files contain "***" lines. "---" is also very common. I
      thought "x" would hint at "x-ed out". "ddd" would be an alternative, but it's
      not really better.

      > - often, I have 2-3 files that are similar (code sources) and
      > I need to make out of them a new file by merging some differences
      > from some of them, usualy taking one as a base and adding/deleting
      > from it).
      > It would be very nice to have vim commands for doing it, something
      > like 'take this line/ this diff region from this file and put it in
      > a new file'. In vertical split arrangement I'd look at both windows,
      > set a pointer to the line (region I want) in one window and say
      > 'move this to the left (right) window (or a new file)'.
      > The new file would be created by going top to bottom and saying
      > for each common/diff part to go/not go to a new file.
      > Or can that be done already and I just don't see it?

      I'm working on this. ":diffget" would get a changed block from the other
      buffer and put it in the current one. ":diffput" does it the other way
      around. A range can be specified, otherwise the diff at the current line is
      used.

      This doesn't work with three buffers, because Vim doesn't know which other
      buffer to use. Specifying the buffer number would be possible, but this
      quickly gets complicated.

      I could actually allow editing 4 buffers in diff mode, but would this be
      useful?

      --
      Q: What is a patch 22?
      A: A patch you need to include to make it possible to include patches.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.