From mboxrd@z Thu Jan 1 00:00:00 1970 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Mon, 27 Apr 2009 21:47:00 +0200 Subject: [sup-talk] redo ideas In-Reply-To: <200904271244.n3RCi1VO027803@smtp6.server.rpi.edu> References: <200904271244.n3RCi1VO027803@smtp6.server.rpi.edu> Message-ID: <1240861270-sup-8603@ausone.local> Excerpts from Mike S's message of Mon Apr 27 14:43:46 +0200 2009: > I'm graduating in a few weeks, so I'll have some free time I can dedicate > to sup again. > > Recently redo functionality was suggested, I believe this was meant to be > a solution for something, but I have been thinking about it for a while. > I'd like to register Ctrl-R to keep with the vim bindings. Just some thoughts about this... I was more thinking about the repeat feature of Vi/Vim (the '.' command) than the redo one. Two other ways of doing the undo/redo: 1/ Save the actions using a data type that we can inverse. Example in Ruby syntax a = Action.add_labels(:foo, :bar) a.apply # actually do the job a.invert # equals to Action.remove_labels(:foo, :bar) 2/ Save the state (has to be defined) at each action. This solution would be limited to actions where the state is manageable. Best regards, -- Nicolas Pouillard