add :/? commands to vim mode

This commit is contained in:
nightwing 2013-02-11 11:43:48 +04:00
commit 8bd7d192d1
2 changed files with 16 additions and 4 deletions

View file

@ -283,17 +283,29 @@ var actions = exports.actions = {
},
":": {
fn: function(editor, range, count, param) {
// not implemented
var val = ":";
if (count > 1)
val = ".,.+" + count + val;
if (editor.cmdLine) {
editor.cmdLine.setValue(val, 1);
editor.cmdLine.focus();
}
}
},
"/": {
fn: function(editor, range, count, param) {
// not implemented
if (editor.cmdLine) {
editor.cmdLine.setValue("/", 1);
editor.cmdLine.focus();
}
}
},
"?": {
fn: function(editor, range, count, param) {
// not implemented
if (editor.cmdLine) {
editor.cmdLine.setValue("?", 1);
editor.cmdLine.focus();
}
}
},
".": {

View file

@ -614,7 +614,7 @@ module.exports = {
};
module.exports.backspace = module.exports.left = module.exports.h;
module.exports.right = module.exports.l;
module.exports.space = module.exports.return = module.exports.right = module.exports.l;
module.exports.up = module.exports.k;
module.exports.down = module.exports.j;
module.exports.pagedown = module.exports["ctrl-d"];