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

vim split window editing => separate window editing?

Expand Messages
  • Linda W
    If vim can split a window and edit the same file in multiple places, shouldn t it be possible to have those windows be disconnected and really be separate
    Message 1 of 12 , Feb 2, 2013
    • 0 Attachment
      If vim can split a window and edit the same file in multiple places,
      shouldn't
      it be possible to have those windows be "disconnected" and really be
      separate windows -- and still edit the same file?

      I don't think there's is a way to currently do that in vim (???)...
      but would it be that hard to change vim to allow such? -- one instance
      of vim with multiple windows open onto the same set of buffers (or same
      file?)...

      How would it be more difficult than running with split windows?

      RFE??





      --
      --
      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.
    • stosss
      ... You can open the same file in separate tabs and view different sections of the file in each tab. and when you :write to one it writes all of them. -- --
      Message 2 of 12 , Feb 2, 2013
      • 0 Attachment
        On Sat, Feb 2, 2013 at 2:11 PM, Linda W <vim@...> wrote:
        > If vim can split a window and edit the same file in multiple places,
        > shouldn't
        > it be possible to have those windows be "disconnected" and really be
        > separate windows -- and still edit the same file?
        >
        > I don't think there's is a way to currently do that in vim (???)...
        > but would it be that hard to change vim to allow such? -- one instance
        > of vim with multiple windows open onto the same set of buffers (or same
        > file?)...
        > How would it be more difficult than running with split windows?
        >
        > RFE??
        >

        You can open the same file in separate tabs and view different
        sections of the file in each tab. and when you :write to one it writes
        all of them.

        --
        --
        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.
      • Benjamin R. Haskell
        ... I m not sure I see what s complex or confusing about it. I can t speak for Linda, but it seems like any of the same reasons to open the same file in
        Message 3 of 12 , Feb 2, 2013
        • 0 Attachment
          On Sat, 2 Feb 2013, Marc Weber wrote:

          > Excerpts from Linda W's message of Sat Feb 02 20:11:33 +0100 2013:
          >> If vim can split a window and edit the same file in multiple places,
          >> shouldn't it be possible to have those windows be "disconnected" and
          >> really be separate windows -- and still edit the same file?
          > Always talk about why you're missing it.
          >
          > a) making a copy is cheap
          > :enew then copy paste buf contents
          >
          > b) opening a second vim instance is cheap, too.
          >
          > So why bother about such complex confusing setup you're talking about?

          I'm not sure I see what's complex or confusing about it. I can't speak
          for Linda, but it seems like any of the same reasons to open the same
          file in multiple buffers would apply:

          1. wanting to see two parts of the same file at once

          2. wanting to have two different views of the same file (different
          folding, different syntax highlighting, etc.)

          She just seems to want it as a separate window, instead of being crammed
          into the same Gvim application window.

          But, I don't suspect the request will be fulfilled. It'd be too
          complicated to implement in terminal Vim. And Gvim is structured such
          that there's a single top-level application window. I haven't looked,
          but I don't think there's a nice way to handle multiple detachable
          windows without rewriting (much/most of) the GUI code.

          --
          Best,
          Ben

          --
          --
          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.
        • stosss
          Marc, the time stamp on your computer is in the future. ... -- In the days of ancient Rome when the republic was still a republic, Lucius Cassius, one of the
          Message 4 of 12 , Feb 2, 2013
          • 0 Attachment
            Marc, the time stamp on your computer is in the future.

            On Sat, Feb 2, 2013 at 3:23 PM, Marc Weber <marco-oweber@...> wrote:
            > Excerpts from Linda W's message of Sat Feb 02 20:11:33 +0100 2013:
            >> If vim can split a window and edit the same file in multiple places,
            >> shouldn't
            >> it be possible to have those windows be "disconnected" and really be
            >> separate windows -- and still edit the same file?
            > Always talk about why you're missing it.
            >
            > a) making a copy is cheap
            > :enew then copy paste buf contents
            >
            > b) opening a second vim instance is cheap, too.
            >
            > So why bother about such complex confusing setup you're talking about?
            >
            > Marc Weber
            >
            > --
            > --
            > 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.
            >
            >



            --
            "In the days of ancient Rome when the republic was still a republic,
            Lucius Cassius, one of the city's most venerated consuls, famously
            coined the phrase cui bono.

            It means As a benefit to whom?, and Lucius Cassius, inquisitive and
            analytical by nature, was always asking the question... whether he was
            investigating a crime or unraveling political corruption." - Simon
            Black

            Like I have always said, "Follow the flow of the money it always
            reveals the truth."

            --
            --
            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.
          • Christian Brabandt
            Hi Linda! ... You can achieve something like this with the client-server feature and two separate gvim instances. regards, Christian -- Bei den Ursachen
            Message 5 of 12 , Feb 2, 2013
            • 0 Attachment
              Hi Linda!

              On Sa, 02 Feb 2013, Linda W wrote:

              > If vim can split a window and edit the same file in multiple places,
              > shouldn't
              > it be possible to have those windows be "disconnected" and really be
              > separate windows -- and still edit the same file?
              >
              > I don't think there's is a way to currently do that in vim (???)...
              > but would it be that hard to change vim to allow such? -- one instance
              > of vim with multiple windows open onto the same set of buffers (or same
              > file?)...
              >
              > How would it be more difficult than running with split windows?
              >
              > RFE??

              You can achieve something like this with the client-server feature and
              two separate gvim instances.

              regards,
              Christian
              --
              Bei den Ursachen unbekannter wichtiger Begebenheiten raten wir immer
              auf angenehme oder unangenehme, selten auf wahrscheinliche und
              natürliche.
              -- Jean Paul

              --
              --
              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.
            • Linda W
              ... If I change contents in one file, it doesn t update in the other. I don t want to have to merge N copies. ... What would be confusing is trying to merge
              Message 6 of 12 , Feb 2, 2013
              • 0 Attachment
                Benjamin R. Haskell wrote:
                > On Sat, 2 Feb 2013, Marc Weber wrote:
                >
                >> Excerpts from Linda W's message of Sat Feb 02 20:11:33 +0100 2013:
                >>
                >> a) making a copy is cheap
                >> :enew then copy paste buf contents
                ----
                If I change contents in one file, it doesn't update in the other.
                I don't want to have to merge 'N' copies.

                >>
                >> So why bother about such complex confusing setup you're talking about?
                ----
                What would be confusing is trying to merge all those copies
                you suggest I make.

                >
                > She just seems to want it as a separate window, instead of being
                > crammed into the same Gvim application window.
                ---
                Yep. Many applications have the ability to detach parts of the app...
                >
                > But, I don't suspect the request will be fulfilled. It'd be too
                > complicated to implement in terminal Vim. And Gvim is structured such
                > that there's a single top-level application window. I haven't looked,
                > but I don't think there's a nice way to handle multiple detachable
                > windows without rewriting (much/most of) the GUI code.
                ---
                Really? I thought there was an ability to tear off menus at some point?
                Or am I hallucinating that? ;-)



                --
                --
                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.
              • Benjamin R. Haskell
                ... I believe the tear-off menus are a built-in feature of GTK+. (Where you need only specify true for some This menu can be torn off property.) IIRC,
                Message 7 of 12 , Feb 2, 2013
                • 0 Attachment
                  On Sat, 2 Feb 2013, Linda W wrote:

                  > Benjamin R. Haskell wrote:
                  >> She just seems to want it as a separate window, instead of being
                  >> crammed into the same Gvim application window.
                  > ---
                  > Yep. Many applications have the ability to detach parts of the app...
                  >>
                  >> But, I don't suspect the request will be fulfilled. It'd be too
                  >> complicated to implement in terminal Vim. And Gvim is structured
                  >> such that there's a single top-level application window. I haven't
                  >> looked, but I don't think there's a nice way to handle multiple
                  >> detachable windows without rewriting (much/most of) the GUI code.
                  > ---
                  > Really? I thought there was an ability to tear off menus at some point?
                  > Or am I hallucinating that? ;-)

                  I believe the tear-off menus are a built-in feature of GTK+. (Where you
                  need only specify 'true' for some "This menu can be torn off" property.)
                  IIRC, letting other things be "tear off" isn't as simple.

                  I could be wrong. I thankfully haven't had to do much GTK programming
                  in a while. Googling "GTK tear off windows" finds GtkHandleBox, so it
                  /might/ be as simple as turning the (vim) tabs into handle boxes.

                  --
                  Best,
                  Ben

                  --
                  --
                  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.
                • Marc Weber
                  ... Always talk about why you re missing it. a) making a copy is cheap ... b) opening a second vim instance is cheap, too. So why bother about such complex
                  Message 8 of 12 , Feb 2, 2013
                  • 0 Attachment
                    Excerpts from Linda W's message of Sat Feb 02 20:11:33 +0100 2013:
                    > If vim can split a window and edit the same file in multiple places,
                    > shouldn't
                    > it be possible to have those windows be "disconnected" and really be
                    > separate windows -- and still edit the same file?
                    Always talk about why you're missing it.

                    a) making a copy is cheap
                    :enew then copy paste buf contents

                    b) opening a second vim instance is cheap, too.

                    So why bother about such complex confusing setup you're talking about?

                    Marc Weber

                    --
                    --
                    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.
                  • Marc Weber
                    Well - opening the same file multiple time is no that bad, because you can make vim - safe the buf if you leave insert mode - reload the buf it has changed Its
                    Message 9 of 12 , Feb 2, 2013
                    • 0 Attachment
                      Well - opening the same file multiple time is no that bad, because you
                      can make vim
                      - safe the buf if you leave insert mode
                      - reload the buf it has changed
                      Its not perfect. If you need assistance with it I'll write a new
                      plugin.

                      If you use google there is a chance to find some somewhat working
                      collaborative editing implementations for Vim.

                      Eg try googling for "collaborative editing vim github"
                      (I haven't tested those), there may be more implementations.

                      Next option: use emacs: It can do it. Evil implements most important Vim
                      modal editing commands just fine.

                      I hope that this reply is more helpful than my first one.

                      Marc Weber

                      --
                      --
                      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.
                    • ping
                      ... that s not an eamcs-only feature. try nrrwrgn: http://www.vim.org/scripts/script.php?script_id=3075 one of my most favorite plugins... -- -- You received
                      Message 10 of 12 , Feb 2, 2013
                      • 0 Attachment
                        On 2/2/2013 5:30 PM, Marc Weber wrote:
                        > Next option: use emacs: It can do it. Evil implements most important Vim
                        > modal editing commands just fine.
                        that's not an "eamcs-only" feature.

                        try nrrwrgn:
                        http://www.vim.org/scripts/script.php?script_id=3075

                        one of my most favorite plugins...

                        --
                        --
                        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.
                      • Marc Weber
                        Hi Linda [1] ... (first mail) Please clarify what you mean by window . In Vim terminology a window is a rectangular region which can display a buffer. Muliple
                        Message 11 of 12 , Feb 3, 2013
                        • 0 Attachment
                          Hi Linda

                          [1]
                          > it be possible to have those windows be "disconnected" and really be
                          > separate windows
                          (first mail)
                          Please clarify what you mean by "window". In Vim terminology a window is
                          a rectangular region which can display a buffer. Muliple windows create
                          a layout. See :h window.

                          in OS terminology a window is something with a [x] at the top right,
                          something you can resize, close, minimize, move to other deskopts etc.
                          thus something like gvim, firefox, open office, etc.

                          [2]
                          > What would be confusing is trying to merge all those copies
                          > you suggest I make.
                          (later mail)

                          See comments about what narrow region plugin does (bottom)
                          Its a little bit confusing, so try again explaining what you mean by
                          - window
                          - merge
                          - disconnected?
                          (eg why disconnect if you want to merge later)

                          So please try again explaining your workflow, what you want to do.

                          What does emacs provide (just try it):

                          emacsclient --daemon

                          then any terminal:
                          emacsclient -c (new window)
                          emacsclient -c (new second window, but internal state is shared in
                          the daemon running)

                          Thus you have two separate OS windows which "merge" automatically -
                          as long as everything is running as same user on the same machine.

                          This feel like collaborative editing (eg titatnpad etherpad or
                          google document like) - but requires all emacs windows to run on the
                          same computer and as the same user (?)

                          For that reason I suggested looking at collaborative editing plugins
                          if they exist.


                          http://www.vim.org/scripts/script.php?script_id=3075
                          NrrwRgn (A Narrow Region Plugin)
                          description:

                          This is a script emulates Emacs Narrowing feature, by opening a selected
                          range in a new scratch buffer.

                          In the scratch buffer simply save it and the changes will be copied
                          into the original file.
                          This is only a very simple help. You should probably read the help,
                          that is provided with the plugin. See :h NarrowRegion

                          Can "copying back to the original buffer" be called "merging"?
                          Depends on what you're looking for. I agree its useful.


                          Maybe try all of those solutions - to get a better understanding what
                          works and what not - and then come back and ask more specific questions.

                          Marc Weber

                          --
                          --
                          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.
                        • vim@...
                          ... From my understanding, Linda would like a second OS-window (and she is already familiar with vim-windows), something that would only be available in a
                          Message 12 of 12 , Feb 3, 2013
                          • 0 Attachment
                            On Sun, 03 Feb 2013 09:29:59 +0100, Marc Weber wrote:
                            > > it be possible to have those windows be "disconnected" and really
                            > > be separate windows
                            > (first mail)
                            > Please clarify what you mean by "window". In Vim terminology a
                            > window is a rectangular region which can display a buffer. Muliple
                            > windows create a layout. See :h window.
                            >
                            > in OS terminology a window is something with a [x] at the top right,
                            > something you can resize, close, minimize, move to other deskopts
                            > etc. thus something like gvim, firefox, open office, etc.

                            From my understanding, Linda would like a second OS-window (and she
                            is already familiar with vim-windows), something that would only be
                            available in a gvim. Additionally, such multiple-OS-windows can be
                            done via an in-proc (one executable running, multiple OS-windows
                            showing from that one proc) or out-of-proc (multiple executables
                            running; such as using --remote commands).

                            -tim



                            --
                            --
                            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.