diff --git a/extension.ts b/extension.ts index 126cf38de6a..cc0fd23cb07 100644 --- a/extension.ts +++ b/extension.ts @@ -87,6 +87,9 @@ export function activate(context: vscode.ExtensionContext) { registerCommand(context, 'extension.vim_8', () => handleKeyEvent("8")); registerCommand(context, 'extension.vim_9', () => handleKeyEvent("9")); + registerCommand(context, 'extension.vim_$', () => handleKeyEvent("$")); + registerCommand(context, 'extension.vim_^', () => handleKeyEvent("^")); + registerCommand(context, 'extension.vim_ctrl_r', () => handleKeyEvent("ctrl+r")); registerCommand(context, 'extension.vim_ctrl_[', () => handleKeyEvent("ctrl+[")); diff --git a/package.json b/package.json index e6ffdd36fae..99a2dfc0c30 100644 --- a/package.json +++ b/package.json @@ -112,11 +112,15 @@ { "key": "8", "command": "extension.vim_8", "when": "editorTextFocus" }, { "key": "9", "command": "extension.vim_9", "when": "editorTextFocus" }, + { "key": "Shift+4", "command": "extension.vim_$", "when": "editorTextFocus" }, + { "key": "Shift+6", "command": "extension.vim_^", "when": "editorTextFocus" }, + { "key": "Ctrl+[", "command": "extension.vim_ctrl_[", "when": "editorTextFocus" }, { "key": "Ctrl+r", "command": "extension.vim_ctrl_r", "when": "editorTextFocus" }, { "key": "Shift+,", "command": "extension.vim_<", "when": "editorTextFocus" }, { "key": "Shift+.", "command": "extension.vim_>", "when": "editorTextFocus" } + ] }, "scripts": { diff --git a/src/mode/modeNormal.ts b/src/mode/modeNormal.ts index a8ab90c2d8b..26de802bf83 100644 --- a/src/mode/modeNormal.ts +++ b/src/mode/modeNormal.ts @@ -19,6 +19,8 @@ export default class CommandMode extends Mode { "j" : () => { Cursor.move(Cursor.down()); }, "k" : () => { Cursor.move(Cursor.up()); }, "l" : () => { Cursor.move(Cursor.right()); }, + "$" : () => { Cursor.move(Cursor.lineEnd()); }, + "^" : () => { Cursor.move(Cursor.lineBegin()); }, "w" : () => { vscode.commands.executeCommand("cursorWordRight"); }, "b" : () => { vscode.commands.executeCommand("cursorWordLeft"); }, ">>" : () => { vscode.commands.executeCommand("editor.action.indentLines"); },