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

Re: undo/redo problem

Expand Messages
  • Tim Chase
    ... Post-facto, I don t know of a way either. But in most of my vimrc files, I have inoremap u inoremap u which preventively
    Message 1 of 8 , Sep 19 3:36 AM
    • 0 Attachment
      On 2013-09-18 23:33, Gary Johnson wrote:
      > The only time I have that problem is when I have just typed some
      > text in insert mode and I accidentally hit Ctrl-W. I don't know of
      > any way to recover that deleted text.

      Post-facto, I don't know of a way either. But in most of my vimrc
      files, I have

      inoremap <c-u> <c-g>u<c-u>
      inoremap <c-w> <c-g>u<c-w>

      which preventively drops an undo breakpoint if I use either <c-u> or
      <c-w> so I can come back later.

      -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.
    • Ben Fritz
      ... You can make use of the . register: http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U -- -- You received this message from the vim_use maillist.
      Message 2 of 8 , Sep 19 8:39 AM
      • 0 Attachment
        On Thursday, September 19, 2013 1:33:53 AM UTC-5, Gary Johnson wrote:
        >
        > The only time I have that problem is when I have just typed some
        >
        > text in insert mode and I accidentally hit Ctrl-W. I don't know of
        >
        > any way to recover that deleted text.
        >

        You can make use of the '.' register:

        http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U

        --
        --
        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.
      • tom arnall
        the :earlier command seems to solve my problem. belated thanks to all for yr generous attention. ... The basic truths are self-evident, but self-evident
        Message 3 of 8 , Sep 22 8:12 PM
        • 0 Attachment
          the :earlier command seems to solve my problem.

          belated thanks to all for yr generous attention.



          ----------------
          "The basic truths are self-evident, but 'self-evident' does not mean
          'obvious'." Spinoza, approx.






          On 9/18/13, Dominique Pellé <dominique.pelle@...> wrote:
          > tom arnall wrote:
          >
          >> I am having a problem with redo/undo behavior. Every week or so, I
          >> will accidentally wipe out some text and when I try to get it back
          >> with undo and/or redo, it never reappears, no matter what direction I
          >> go. My undo level is 5000. History is at default.
          >
          > Are you sure it does not happen because you created an undo branch?
          > :undo only goes back in the current branch. Try the :earlier command.
          > I recommend using the undotree plugin, or the Gundo plugin to
          > make it easier to navigate in the undo tree.
          >
          > http://www.vim.org/scripts/script.php?script_id=4177
          > http://www.vim.org/scripts/script.php?script_id=3304
          >
          > Dominique
          >
          > --
          > --
          > 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.
          >

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