Add H, M & L motions
This commit is contained in:
parent
16b2f1c9cf
commit
877bc9aeb9
1 changed files with 34 additions and 0 deletions
|
|
@ -262,6 +262,40 @@ module.exports = {
|
||||||
editor.selection.selectLeft();
|
editor.selection.selectLeft();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"H": {
|
||||||
|
nav: function(editor) {
|
||||||
|
var row = editor.renderer.getScrollTopRow();
|
||||||
|
editor.moveCursorTo(row);
|
||||||
|
},
|
||||||
|
sel: function(editor) {
|
||||||
|
var row = editor.renderer.getScrollTopRow();
|
||||||
|
editor.selection.selectTo(row);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"M": {
|
||||||
|
nav: function(editor) {
|
||||||
|
var topRow = editor.renderer.getScrollTopRow();
|
||||||
|
var bottomRow = editor.renderer.getScrollBottomRow();
|
||||||
|
var row = topRow + ((bottomRow - topRow) / 2);
|
||||||
|
editor.moveCursorTo(row);
|
||||||
|
},
|
||||||
|
sel: function(editor) {
|
||||||
|
var topRow = editor.renderer.getScrollTopRow();
|
||||||
|
var bottomRow = editor.renderer.getScrollBottomRow();
|
||||||
|
var row = topRow + ((bottomRow - topRow) / 2);
|
||||||
|
editor.selection.selectTo(row);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"L": {
|
||||||
|
nav: function(editor) {
|
||||||
|
var row = editor.renderer.getScrollBottomRow();
|
||||||
|
editor.moveCursorTo(row);
|
||||||
|
},
|
||||||
|
sel: function(editor) {
|
||||||
|
var row = editor.renderer.getScrollBottomRow();
|
||||||
|
editor.selection.selectTo(row);
|
||||||
|
}
|
||||||
|
},
|
||||||
"k": {
|
"k": {
|
||||||
nav: function(editor) {
|
nav: function(editor) {
|
||||||
editor.navigateUp();
|
editor.navigateUp();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue