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

[patch] 'undolevels' should be buffer-local

Expand Messages
  • Christian Brabandt
    Hi Bram, attached is a patch, that makes undolevels a buffer-local option. I think, this is useful if you are editing a large file you might want to disable
    Message 1 of 15 , Dec 13, 2010
    • 0 Attachment
      Hi Bram,
      attached is a patch, that makes 'undolevels' a buffer-local option. I
      think, this is useful if you are editing a large file you might want to
      disable undo completely, without loosing the undo information for other
      buffers.

      regards,
      Christian

      --
      You received this message from the "vim_dev" 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
    • Bram Moolenaar
      ... Yes, this makes a lot of sense. Perhaps the option should be global-local? That means that :set will work as it does now, changing the value for all
      Message 2 of 15 , Dec 14, 2010
      • 0 Attachment
        Christian Brabandt wrote:

        > attached is a patch, that makes 'undolevels' a buffer-local option. I
        > think, this is useful if you are editing a large file you might want to
        > disable undo completely, without loosing the undo information for other
        > buffers.

        Yes, this makes a lot of sense.

        Perhaps the option should be global-local? That means that ":set" will
        work as it does now, changing the value for all buffers, except for
        buffers where ":setlocal" was used to specify a different value.

        Although the change is straightforward, it would still be nice to have a
        test for this. Thus edit a file, check that undolevels works (try two
        values), split the window to edit another file, verify that setting
        undolevels here doesn't change what happens in the other buffer.
        Something like that.

        --
        Bypasses are devices that allow some people to dash from point A to
        point B very fast while other people dash from point B to point A very
        fast. People living at point C, being a point directly in between, are
        often given to wonder what's so great about point A that so many people
        from point B are so keen to get there and what's so great about point B
        that so many people from point A are so keen to get there. They often
        wish that people would just once and for all work out where the hell
        they wanted to be.
        -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        You received this message from the "vim_dev" 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
      • Christian J. Robinson
        ... This patch is a good idea, and I second the idea of it being global-local. - Christian (Oh look, two Christian s on the list.) -- You may be only one
        Message 3 of 15 , Dec 14, 2010
        • 0 Attachment
          On Tue, 14 Dec 2010, Bram Moolenaar wrote:

          > Christian Brabandt wrote:
          >
          >> attached is a patch, that makes 'undolevels' a buffer-local option.
          >
          > Perhaps the option should be global-local?

          This patch is a good idea, and I second the idea of it being
          global-local.

          - Christian

          (Oh look, two "Christian"s on the list.)

          --
          You may be only one person in the world,
          but you may also be the world to one person.
          Christian J. Robinson <heptite@...> http://christianrobinson.name/

          --
          You received this message from the "vim_dev" 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
        • Christian Brabandt
          Hi Bram! ... Attached is a new version, that is global-local. Please check, I am not sure, I understand the code correctly. ... I can probably make a test. But
          Message 4 of 15 , Dec 16, 2010
          • 0 Attachment
            Hi Bram!

            On Di, 14 Dez 2010, Bram Moolenaar wrote:

            >
            > Christian Brabandt wrote:
            >
            > > attached is a patch, that makes 'undolevels' a buffer-local option. I
            > > think, this is useful if you are editing a large file you might want to
            > > disable undo completely, without loosing the undo information for other
            > > buffers.
            >
            > Yes, this makes a lot of sense.
            >
            > Perhaps the option should be global-local? That means that ":set" will
            > work as it does now, changing the value for all buffers, except for
            > buffers where ":setlocal" was used to specify a different value.

            Attached is a new version, that is global-local. Please check, I am not
            sure, I understand the code correctly.

            > Although the change is straightforward, it would still be nice to have a
            > test for this. Thus edit a file, check that undolevels works (try two
            > values), split the window to edit another file, verify that setting
            > undolevels here doesn't change what happens in the other buffer.
            > Something like that.

            I can probably make a test. But this will have to wait a couple of days.

            regards,
            Christian
            --
            Ich bin froh, daß Du da bist und nicht hier.
            -- Kurt Tucholsky

            --
            You received this message from the "vim_dev" 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
          • Christian Brabandt
            Hi vim_dev! ... Sorry, that was wrong. Here is the version, that should work. regards, Christian -- You received this message from the vim_dev maillist. Do
            Message 5 of 15 , Dec 17, 2010
            • 0 Attachment
              Hi vim_dev!

              On Fr, 17 Dez 2010, Christian Brabandt wrote:

              > Attached is a new version, that is global-local. Please check, I am not
              > sure, I understand the code correctly.

              Sorry, that was wrong. Here is the version, that should work.

              regards,
              Christian

              --
              You received this message from the "vim_dev" 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
            • Christian Brabandt
              Hi vim_dev! ... And now really with the version, I meant to attach. Sorry for the confusion. Mit freundlichen Grüßen Christian -- You received this message
              Message 6 of 15 , Dec 17, 2010
              • 0 Attachment
                Hi vim_dev!

                On Fr, 17 Dez 2010, Christian Brabandt wrote:

                > On Fr, 17 Dez 2010, Christian Brabandt wrote:
                >
                > > Attached is a new version, that is global-local. Please check, I am not
                > > sure, I understand the code correctly.
                >
                > Sorry, that was wrong. Here is the version, that should work.

                And now really with the version, I meant to attach. Sorry for the
                confusion.

                Mit freundlichen Grüßen
                Christian

                --
                You received this message from the "vim_dev" 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
              • Samuel Ferencik
                ... Hi Christian, Bram, It seems this got missed (back in 2010). Can we resurrect it, please? Are there some guidelines for writing tests for vim? If so, I
                Message 7 of 15 , Oct 29, 2013
                • 0 Attachment
                  On Friday, December 17, 2010 9:55:18 AM UTC+1, Christian Brabandt wrote:
                  > Hi vim_dev!
                  >
                  > On Fr, 17 Dez 2010, Christian Brabandt wrote:
                  >
                  > > On Fr, 17 Dez 2010, Christian Brabandt wrote:
                  > >
                  > > > Attached is a new version, that is global-local. Please check, I am not
                  > > > sure, I understand the code correctly.
                  > >
                  > > Sorry, that was wrong. Here is the version, that should work.
                  >
                  > And now really with the version, I meant to attach. Sorry for the
                  > confusion.
                  >
                  > Mit freundlichen Gr��en
                  > Christian

                  Hi Christian, Bram,

                  It seems this got missed (back in 2010). Can we resurrect it, please?

                  Are there some guidelines for writing tests for vim? If so, I could help with that bit.

                  Thanks,
                  Sam

                  --
                  --
                  You received this message from the "vim_dev" 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_dev" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                • Ben Fritz
                  ... Yes, please! I actually have removed the LargeFiles plugin, because I kept losing all my undo history on files I already had open in Vim! I would add it
                  Message 8 of 15 , Oct 30, 2013
                  • 0 Attachment
                    On Tuesday, October 29, 2013 9:17:43 PM UTC-5, Samuel Ferencik wrote:
                    >
                    > It seems this got missed (back in 2010). Can we resurrect it, please?
                    >

                    Yes, please! I actually have removed the LargeFiles plugin, because I kept losing all my undo history on files I already had open in Vim! I would add it back fairly quickly if it were able to only affect the buffer for the large file instead of every buffer in Vim!

                    --
                    --
                    You received this message from the "vim_dev" 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_dev" group.
                    To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                    For more options, visit https://groups.google.com/groups/opt_out.
                  • Christian Brabandt
                    Hi Samuel! ... It s in the todo list, so at least it s not forgotten. If a test increases the chance to have it included sooner, I ll happy write one. regards,
                    Message 9 of 15 , Oct 30, 2013
                    • 0 Attachment
                      Hi Samuel!

                      On Di, 29 Okt 2013, Samuel Ferencik wrote:

                      > On Friday, December 17, 2010 9:55:18 AM UTC+1, Christian Brabandt wrote:
                      > > Hi vim_dev!
                      > >
                      > > On Fr, 17 Dez 2010, Christian Brabandt wrote:
                      > >
                      > > > On Fr, 17 Dez 2010, Christian Brabandt wrote:
                      > > >
                      > > > > Attached is a new version, that is global-local. Please check, I am not
                      > > > > sure, I understand the code correctly.
                      > > >
                      > > > Sorry, that was wrong. Here is the version, that should work.
                      > >
                      > > And now really with the version, I meant to attach. Sorry for the
                      > > confusion.
                      > >
                      > > Mit freundlichen Gr��en
                      > > Christian
                      >
                      > Hi Christian, Bram,
                      >
                      > It seems this got missed (back in 2010). Can we resurrect it, please?
                      >
                      > Are there some guidelines for writing tests for vim? If so, I could help with that bit.

                      It's in the todo list, so at least it's not forgotten. If a test
                      increases the chance to have it included sooner, I'll happy write one.


                      regards,
                      Christian
                      --
                      Wir achten auch wider Willen die, welche wir geachtet sehen.
                      -- Joseph Joubert (Gedanken, Versuche und Maximen)

                      --
                      --
                      You received this message from the "vim_dev" 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_dev" group.
                      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                      For more options, visit https://groups.google.com/groups/opt_out.
                    • Samuel Ferencik
                      ... Funny - LargeFiles is exactly what prompted me to report this. -- -- You received this message from the vim_dev maillist. Do not top-post! Type your
                      Message 10 of 15 , Oct 30, 2013
                      • 0 Attachment
                        On Wednesday, October 30, 2013 3:57:32 PM UTC+1, Ben Fritz wrote:
                        > On Tuesday, October 29, 2013 9:17:43 PM UTC-5, Samuel Ferencik wrote:
                        > >
                        > > It seems this got missed (back in 2010). Can we resurrect it, please?
                        > >
                        >
                        > Yes, please! I actually have removed the LargeFiles plugin, because I kept
                        > losing all my undo history on files I already had open in Vim! I would add it
                        > back fairly quickly if it were able to only affect the buffer for the large
                        > file instead of every buffer in Vim!

                        Funny - LargeFiles is exactly what prompted me to report this.

                        --
                        --
                        You received this message from the "vim_dev" 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_dev" group.
                        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                        For more options, visit https://groups.google.com/groups/opt_out.
                      • Samuel Ferencik
                        ... That would be great, Christian; thanks! Sam -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text
                        Message 11 of 15 , Oct 30, 2013
                        • 0 Attachment
                          On Wednesday, October 30, 2013 11:20:33 PM UTC+1, Christian Brabandt wrote:
                          > It's in the todo list, so at least it's not forgotten. If a test
                          >
                          > increases the chance to have it included sooner, I'll happy write one.

                          That would be great, Christian; thanks!
                          Sam

                          --
                          --
                          You received this message from the "vim_dev" 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_dev" group.
                          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                          For more options, visit https://groups.google.com/groups/opt_out.
                        • Charles Campbell
                          ... Hello, Ben: Please try LargeFile v5k. This version should retain undo history if your vim has persistent undo available. Its pretty new, so there may
                          Message 12 of 15 , Oct 31, 2013
                          • 0 Attachment
                            Ben Fritz wrote:
                            > On Tuesday, October 29, 2013 9:17:43 PM UTC-5, Samuel Ferencik wrote:
                            >> It seems this got missed (back in 2010). Can we resurrect it, please?
                            >>
                            > Yes, please! I actually have removed the LargeFiles plugin, because I kept losing all my undo history on files I already had open in Vim! I would add it back fairly quickly if it were able to only affect the buffer for the large file instead of every buffer in Vim!
                            >
                            Hello, Ben:

                            Please try LargeFile v5k. This version should retain undo history if
                            your vim has persistent undo available. Its pretty new, so there may
                            well be bugs with the undo history stuff.
                            You may get a copy from my website:
                            http://www.drchip.org/astronaut/vim/index.html#LARGEFILE

                            Regards,
                            Chip Campbell

                            --
                            --
                            You received this message from the "vim_dev" 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_dev" group.
                            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                            For more options, visit https://groups.google.com/groups/opt_out.
                          • Christian Brabandt
                            Hi Charles! ... May I ask, how you work around it? Mit freundlichen Grüßen Christian -- Ich erziehe Kinder nicht zu etwas, sondern in etwas. -- Jean Paul --
                            Message 13 of 15 , Oct 31, 2013
                            • 0 Attachment
                              Hi Charles!

                              On Do, 31 Okt 2013, Charles Campbell wrote:
                              >
                              > Please try LargeFile v5k. This version should retain undo history
                              > if your vim has persistent undo available. Its pretty new, so there
                              > may well be bugs with the undo history stuff.
                              > You may get a copy from my website:
                              > http://www.drchip.org/astronaut/vim/index.html#LARGEFILE

                              May I ask, how you work around it?

                              Mit freundlichen Grüßen
                              Christian
                              --
                              Ich erziehe Kinder nicht zu etwas, sondern in etwas.
                              -- Jean Paul

                              --
                              --
                              You received this message from the "vim_dev" 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_dev" group.
                              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                              For more options, visit https://groups.google.com/groups/opt_out.
                            • Charles Campbell
                              ... I use BufEnter and BufLeave events coupled with bufdo, rundo, and wundo. Regards, Charles Campbell -- -- You received this message from the vim_dev
                              Message 14 of 15 , Oct 31, 2013
                              • 0 Attachment
                                Christian Brabandt wrote:
                                > Hi Charles!
                                >
                                > On Do, 31 Okt 2013, Charles Campbell wrote:
                                >> Please try LargeFile v5k. This version should retain undo history
                                >> if your vim has persistent undo available. Its pretty new, so there
                                >> may well be bugs with the undo history stuff.
                                >> You may get a copy from my website:
                                >> http://www.drchip.org/astronaut/vim/index.html#LARGEFILE
                                > May I ask, how you work around it?
                                >
                                I use BufEnter and BufLeave events coupled with bufdo, rundo, and wundo.

                                Regards,
                                Charles Campbell

                                --
                                --
                                You received this message from the "vim_dev" 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_dev" group.
                                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                                For more options, visit https://groups.google.com/groups/opt_out.
                              • Ben Fritz
                                ... Thanks, I ll keep that in mind. But I edit large enough files to care about such things infrequently enough that I tend to just open them in their own Vim
                                Message 15 of 15 , Oct 31, 2013
                                • 0 Attachment
                                  On Thursday, October 31, 2013 1:38:07 PM UTC-5, Charles Campbell wrote:
                                  > Hello, Ben:
                                  >
                                  >
                                  >
                                  > Please try LargeFile v5k. This version should retain undo history if
                                  >
                                  > your vim has persistent undo available. Its pretty new, so there may
                                  >
                                  > well be bugs with the undo history stuff.
                                  >
                                  > You may get a copy from my website:
                                  >
                                  > http://www.drchip.org/astronaut/vim/index.html#LARGEFILE
                                  >
                                  >

                                  Thanks, I'll keep that in mind. But I edit large enough files to care about such things infrequently enough that I tend to just open them in their own Vim now.

                                  --
                                  --
                                  You received this message from the "vim_dev" 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_dev" group.
                                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+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.