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

New vs split

Expand Messages
  • Ven Tadipatri
    Is there a difference between new and split? If they re the same, is one considered more standard ? Or if they re different, when would you use one versus the
    Message 1 of 5 , Feb 4, 2013
    • 0 Attachment
      Is there a difference between new and split? If they're the same, is
      one considered more 'standard'? Or if they're different, when would
      you use one versus the other? I think both have vertical equivalents
      right (vnew and vsplit)?

      Thanks,
      Ven

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Jürgen Krämer
      Hi, ... their behavior is the same if you provide both commands with a file name. If you don t, :split creates a new window for the current buffer, while ...
      Message 2 of 5 , Feb 4, 2013
      • 0 Attachment
        Hi,

        Ven Tadipatri wrote:
        > Is there a difference between new and split? If they're the same, is
        > one considered more 'standard'? Or if they're different, when would
        > you use one versus the other? I think both have vertical equivalents
        > right (vnew and vsplit)?

        their behavior is the same if you provide both commands with a file name.

        If you don't, :split creates a new window for the current buffer, while
        :new creates a new buffer and a new window for this buffer.

        Regards,
        Jürgen

        --
        Sometimes I think the surest sign that intelligent life exists elsewhere
        in the universe is that none of it has tried to contact us. (Calvin)

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Charles Campbell
        ... They are not the same at all. new/vnew creates an empty window split/vsplit splits the current window, showing the same buffer in both Regards, Chip
        Message 3 of 5 , Feb 4, 2013
        • 0 Attachment
          Ven Tadipatri wrote:
          > Is there a difference between new and split? If they're the same, is
          > one considered more 'standard'? Or if they're different, when would
          > you use one versus the other? I think both have vertical equivalents
          > right (vnew and vsplit)?
          >
          They are not the same at all.

          new/vnew creates an empty window
          split/vsplit splits the current window, showing the same buffer in both

          Regards,
          Chip Campbell

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Charles Campbell
          ... These commands are definitely not the same. new/vnew : split the window, but edit a new (empty) buffer split/vsplit : split the window, but edit the same
          Message 4 of 5 , Feb 4, 2013
          • 0 Attachment
            Ven Tadipatri wrote:
            > Is there a difference between new and split? If they're the same, is
            > one considered more 'standard'? Or if they're different, when would
            > you use one versus the other? I think both have vertical equivalents
            > right (vnew and vsplit)?
            >

            These commands are definitely not the same.

            new/vnew : split the window, but edit a new (empty) buffer
            split/vsplit : split the window, but edit the same buffer

            Regards,
            C Campbell

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Ben Fritz
            ... I *think* the only difference is when you don t specify a file name, :new and :vnew give you an empty buffer, but :split and :vsplit use the current
            Message 5 of 5 , Feb 4, 2013
            • 0 Attachment
              On Monday, February 4, 2013 9:48:40 AM UTC-6, vtadipatri wrote:
              > Is there a difference between new and split? If they're the same, is
              >
              > one considered more 'standard'? Or if they're different, when would
              >
              > you use one versus the other? I think both have vertical equivalents
              >
              > right (vnew and vsplit)?
              >

              I *think* the only difference is when you don't specify a file name, :new and :vnew give you an empty buffer, but :split and :vsplit use the current buffer.

              I'm not 100% certain on that however.

              :help :split_f is the entry for both :split and :new commands, so probably this is the case.

              I normally use :new or :e when creating a new file and :sp or CTRL-W_S to create new splits on an existing buffer, but I don't *need* to do it that way.

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            Your message has been successfully submitted and would be delivered to recipients shortly.