aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Jahns2013-10-08 18:06:09 (EDT)
committerBogdan Gheorghe2013-11-08 17:05:50 (EST)
commit066dfe000b256e03a956813dbf5206b0dad6b682 (patch)
tree8fcc33d1bb5145473f4e0fb69df60e406616f7ad
parent766f94481e938f4cc697d6250a5cd0d0895924f5 (diff)
downloadorg.eclipse.orion.client-066dfe000b256e03a956813dbf5206b0dad6b682.zip
org.eclipse.orion.client-066dfe000b256e03a956813dbf5206b0dad6b682.tar.gz
org.eclipse.orion.client-066dfe000b256e03a956813dbf5206b0dad6b682.tar.bz2
[Bug 418968] Vi Keybindings - 'u' triggers undo --Signed-off-by: Steve Jahns <s.t.jahns@gmail.com>
-rw-r--r--bundles/org.eclipse.orion.client.editor/web/orion/editor/vi.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/vi.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/vi.js
index 38f7db7..ccf2445 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/vi.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/vi.js
@@ -660,6 +660,9 @@ define("orion/editor/vi", [ //$NON-NLS-0$
bindings.push({actionID: "vi-p", keyBinding: createStroke("p", false, false, false, false, "keypress"), predefined: true}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
bindings.push({actionID: "vi-P", keyBinding: createStroke("P", false, false, false, false, "keypress"), predefined: true}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+ // Undo
+ bindings.push({actionID: "vi-u", keyBinding: createStroke("u", false, false, false, false, "keypress"), predefined: true}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+
//Change
bindings.push({actionID: "vi-c", keyBinding: createStroke("c", false, false, false, false, "keypress"), predefined: true}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
bindings.push({actionID: "vi-d", keyBinding: createStroke("d", false, false, false, false, "keypress"), predefined: true}); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
@@ -812,6 +815,11 @@ define("orion/editor/vi", [ //$NON-NLS-0$
});
}, {name: messages.viP});
+ // Undo
+ view.setAction("vi-u", function() { //$NON-NLS-0$
+ return self._invoke("undo"); //$NON-NLS-0$
+ }, {name: messages.Undo});
+
//Change actions
view.setAction("vi-c", function() { //$NON-NLS-0$
view.removeKeyMode(self);
@@ -919,4 +927,4 @@ define("orion/editor/vi", [ //$NON-NLS-0$
return {
VIMode: VIMode
};
-}); \ No newline at end of file
+});