undo/redo problem

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

undo/redo problem

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

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: undo/redo problem

Dominique Pellé
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: undo/redo problem

Erik Christiansen
In reply to this post by tom arnall
On 18.09.13 22:13, 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 "Every week or so", using U instead of u?

Erik

--
Tecoma's Macca's-striking flash mob: http://www.youtube.com/watch?v=H7-0T1vbnWE
Stop fat food joint opposite Tecoma preschool:        www.change.org
Taking democracy (98,000 signatures) from Australia to Chicago:
http://www.abc.net.au/news/2013-09-17/tecoma-residents-take-fight-against-mcdonalds-to-chicago/4963866

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: undo/redo problem

Christian Brabandt
In reply to this post by tom arnall
On Thu, September 19, 2013 07:13, 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.

What commands did you exactly try? Can you check the output of
:echo chagnenr()
What happens if you do:
:earlier 9999
and then step through your undo history using g+ (normal mode command)?

Note, a plugin like histwin or undotree might help you in determinig the
undo states you are looking for.

regards,
Christian

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: undo/redo problem

Gary Johnson-4
In reply to this post by tom arnall
On 2013-09-18, 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.

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.

Regards,
Gary

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: undo/redo problem

Tim Chase
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: undo/redo problem

Benjamin Fritz
In reply to this post by Gary Johnson-4
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: undo/redo problem

tom arnall
In reply to this post by Dominique Pellé
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é <[hidden email]> 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 [hidden email].
> 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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.