This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Memento(originalState) { | |
| this.state = originalState; | |
| this.stack = new Array(this.state); | |
| this.stackIndex = 0; | |
| } | |
| Memento.prototype.undo = function () { | |
| return this.stackIndex > 0 ? | |
| this.state = this.stack[--this.stackIndex]: this.state; | |
| }; | |
| Memento.prototype.save = function (state) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # F で fetch (default: :toggle file-name / :toggle commit-title-refs) | |
| bind generic F ?git fetch %(remote) | |
| bind main F ?git fetch %(remote) | |
| # Alt-f で :toggle file-name / :toggle commit-title-refs | |
| bind generic <Esc>f :toggle file-name | |
| bind main <Esc>f :toggle commit-title-refs | |
| # U で pull | |
| bind generic U ?git pull %(remote) |