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:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user