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

Re: vim: suggestion: multiple __CONTIGUOUS__ files

Expand Messages
  • Bram Moolenaar
    ... No, this can t be done with Vim. Interesting idea though. -- ARTHUR: Shut up! Will you shut up! DENNIS: Ah, now we see the violence inherent in the
    Message 1 of 7 , Jun 29, 2002
    • 0 Attachment
      Neil Zanella wrote:

      > This time I have something which I believe is something really innovative
      > that has not been done before, or perhaps it has. Suppose there are N
      > files to be opened at once with vim. Instead of displaying all of
      > them on the same window, they could be displayed in the same
      > way that they would appear when concatenating them with the
      > cat utility and piping them through less. The exception
      > is that each file is separated by one of those reverse
      > video lines in vim displaying the title of the file.
      > Only the bottom of each file is concatenated to
      > the top of the very next one using this scheme.
      > Perhaps this is not so innovative, but has it
      > been done? One could still use the tab key
      > to go from one window to another.
      >
      > Can this be done using vim???

      No, this can't be done with Vim. Interesting idea though.

      --
      ARTHUR: Shut up! Will you shut up!
      DENNIS: Ah, now we see the violence inherent in the system.
      ARTHUR: Shut up!
      DENNIS: Oh! Come and see the violence inherent in the system!
      HELP! HELP! I'm being repressed!
      The Quest for the Holy Grail (Monty Python)

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    • Benji Fisher
      ... Try $ vim -o foo/* ... in particular and ... in general. HTH --Benji Fisher
      Message 2 of 7 , Jun 29, 2002
      • 0 Attachment
        On Saturday, June 29, 2002, at 03:30 AM, Neil Zanella wrote:

        >
        > Hello,
        >
        > I have many text files in a directory called foo and want to start up
        > vim
        > so that the vim application window is split up into N horizontal panels
        > each displaying a file from directory foo upon startup. Is there a
        > command to do this such as:
        >
        > $ vim -display-files *

        Try

        $ vim -o foo/*

        :help -o

        in particular and

        :help startup-options

        in general.

        HTH --Benji Fisher
      • Neil Zanella
        I wonder whether anyone has added such a hack to vim to date? Thanks to all developers for improving vim over the years... Regards, Neil
        Message 3 of 7 , Feb 8, 2004
        • 0 Attachment
          I wonder whether anyone has added such a hack to vim to date?

          Thanks to all developers for improving vim over the years...

          Regards,

          Neil

          On Sat, 29 Jun 2002, Bram Moolenaar wrote:

          > Neil Zanella wrote:
          >
          > > This time I have something which I believe is something really innovative
          > > that has not been done before, or perhaps it has. Suppose there are N
          > > files to be opened at once with vim. Instead of displaying all of
          > > them on the same window, they could be displayed in the same
          > > way that they would appear when concatenating them with the
          > > cat utility and piping them through less. The exception
          > > is that each file is separated by one of those reverse
          > > video lines in vim displaying the title of the file.
          > > Only the bottom of each file is concatenated to
          > > the top of the very next one using this scheme.
          > > Perhaps this is not so innovative, but has it
          > > been done? One could still use the tab key
          > > to go from one window to another.
          > >
          > > Can this be done using vim???
          >
          > No, this can't be done with Vim. Interesting idea though.
        • Yakov Lerner
          ... I have a unix script called vg , or vgroup which does almost exactly what you ask. vg file1 file2 .... fileN combines files into single file with unique
          Message 4 of 7 , Feb 9, 2004
          • 0 Attachment
            >>Neil Zanella wrote:
            >>
            >>
            >>>This time I have something which I believe is something really innovative
            >>>that has not been done before, or perhaps it has. Suppose there are N
            >>>files to be opened at once with vim. Instead of displaying all of
            >>>them on the same window, they could be displayed in the same
            >>>way that they would appear when concatenating them with the
            >>>cat utility and piping them through less. The exception
            >>>is that each file is separated by one of those reverse
            >>>video lines in vim displaying the title of the file.
            >>>Only the bottom of each file is concatenated to
            >>>the top of the very next one using this scheme.
            >>>Perhaps this is not so innovative, but has it
            >>>been done? One could still use the tab key
            >>>to go from one window to another.
            >>>
            >>>Can this be done using vim???

            I have a unix script called 'vg', or 'vgroup' which does almost exactly
            what you ask.
            vg file1 file2 .... fileN
            combines files into single file with unique separator line between them,
            then opens single file with editor, then (after editor quits) script
            unpacks files back.

            The script works for me (in Unix) and I use it from time to time.
            It's convenient for global search and replace.
            The script can be improved, but it's good enough for me.

            I wonder whether it's correct to post such vim wrapper' script
            to 'scripts' collection at vim.org. But on the other hand, such
            thing can be done as vim plugin, also.

            It's easy to add syntax highlighting for separator lines for
            such thing but it's not done yet.
            The script is smart enough to choose correct unique separator
            to ensure that separator is such that is does not occur inside given files.
            The script also correctly handles files with missing newlines
            at end of file. This somehow complicates the script.

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