1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-01 10:15:46 +01:00

Add some mappings to AUTOCOMPLETE mode.

This commit is contained in:
Kris Maglione
2011-02-17 22:23:51 -05:00
parent 56b7f55ef6
commit a6e245b0bf
2 changed files with 23 additions and 2 deletions

View File

@@ -839,6 +839,27 @@ var Editor = Module("editor", {
modes.pop(modes.TEXT_EDIT);
},
{ count: true });
function bind() mappings.add.apply(mappings,
[[modes.AUTOCOMPLETE]].concat(Array.slice(arguments)))
bind(["<Esc>"], "Return to INSERT mode",
function () Events.PASS);
bind(["<Up>"], "Select the next autocompletion result",
function () Events.PASS);
bind(["<Down>"], "Select the next autocompletion result",
function () Events.PASS);
bind(["<C-[>"], "Return to INSERT mode",
function () { events.feedkeys("<Esc>", { skipmap: true }); });
bind(["<C-n>"], "Select the next autocompletion result",
function () { events.feedkeys("<Down>", { skipmap: true }); });
bind(["<C-p>"], "Select the next previous result",
function () { events.feedkeys("<Up>", { skipmap: true }); });
},
options: function () {