From: Seebs on 8 Apr 2010 16:38 On 2010-04-08, Janis Papanagnou <janis_papanagnou(a)hotmail.com> wrote: > This is behaviour you have as well in vim, though with other keys of > course; <U> (undo) goes back in the chain and <ctrl-R> (redo) goes up > the chain. There seems really no need (besides being used to old vi's > behaviour, and reluctance to switch) for the special case of toggling. The problem is that, in vim, if I try to use 'uu', Something Unexpected Happens. Without having been told about "ctrl-R", I had no way of recovering. nvi's solution satisfies the principle of least astonishment; if you don't do something that you would never do in normal usage in old vi, it works identically. > If there's something special in nvi I probably just don't understand > your description. In vim you can go up and down in the undo chain as > well. IMO there's no need for an additional <U> <U> toggling when you > have <U> <ctrl-R> as the general case available. But YMMV, of course. I assume you mean "u", not "U" here? > BTW, in vim you've in addition identifying messages for undo's (if you > like this information), like: "1 change; before #112 1 seconds ago". Yup. I don't care either way. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Christian Brabandt on 8 Apr 2010 17:07 On 2010-04-08, Seebs <usenet-nospam(a)seebs.net> wrote: > On 2010-04-08, Janis Papanagnou <janis_papanagnou(a)hotmail.com> wrote: >> This is behaviour you have as well in vim, though with other keys of >> course; <U> (undo) goes back in the chain and <ctrl-R> (redo) goes up >> the chain. There seems really no need (besides being used to old vi's >> behaviour, and reluctance to switch) for the special case of toggling. > > The problem is that, in vim, if I try to use 'uu', Something Unexpected > Happens. Without having been told about "ctrl-R", I had no way of > recovering. nvi's solution satisfies the principle of least astonishment; > if you don't do something that you would never do in normal usage in > old vi, it works identically. If you are using vim in 'compatible' mode, nothing unexpected should happen. If you'd like to use vim in nocompatible mode, you can set :set cpo+=u which makes vim's u command behave like vi's u command regards, Christian
From: Seebs on 8 Apr 2010 17:17 On 2010-04-08, Christian Brabandt <cb-news(a)256bit.org> wrote: > On 2010-04-08, Seebs <usenet-nospam(a)seebs.net> wrote: >> In nvi, hitting 'u' repeatedly toggles the last change, as it does in >> regular vi. The usage is: >> >> u => undo (or redo if you just did an undo) >> . after u => continue in that direction through the undo/redo stack >> . after moving => redo last change > Was this really the case for plain old vi? The '.' after u part was not. The toggling when you hit 'u' repeatedly was. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Christian Brabandt on 8 Apr 2010 17:24 On 2010-04-08, Seebs <usenet-nospam(a)seebs.net> wrote: > On 2010-04-08, Christian Brabandt <cb-news(a)256bit.org> wrote: >> On 2010-04-08, Seebs <usenet-nospam(a)seebs.net> wrote: >>> In nvi, hitting 'u' repeatedly toggles the last change, as it does in >>> regular vi. The usage is: >>> >>> u => undo (or redo if you just did an undo) >>> . after u => continue in that direction through the undo/redo stack >>> . after moving => redo last change > >> Was this really the case for plain old vi? > > The '.' after u part was not. The toggling when you hit 'u' repeatedly > was. That was, what I meant. regards, Christian
From: Seebs on 8 Apr 2010 17:27 On 2010-04-08, Christian Brabandt <cb-news(a)256bit.org> wrote: > On 2010-04-08, Seebs <usenet-nospam(a)seebs.net> wrote: >> On 2010-04-08, Christian Brabandt <cb-news(a)256bit.org> wrote: >>> On 2010-04-08, Seebs <usenet-nospam(a)seebs.net> wrote: >>>> In nvi, hitting 'u' repeatedly toggles the last change, as it does in >>>> regular vi. The usage is: >>>> >>>> u => undo (or redo if you just did an undo) >>>> . after u => continue in that direction through the undo/redo stack >>>> . after moving => redo last change >> >>> Was this really the case for plain old vi? >> >> The '.' after u part was not. The toggling when you hit 'u' repeatedly >> was. > > That was, what I meant. I'm pretty sure that spamming 'u' toggled the last command back and forth repeatedly. I don't have one to check anymore. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: very strange ksh behavior Next: problems with loop in bash |