Skip to content

Commit

Permalink
Merge pull request VSCodeVim#139 from johnfn/ctrl-c
Browse files Browse the repository at this point in the history
Add ctrl-c.
  • Loading branch information
jpoon committed Feb 10, 2016
2 parents d086ccb + 9b7d0da commit 3eae649
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function activate(context: vscode.ExtensionContext) {
registerCommand(context, 'extension.vim_ctrl_r', () => handleKeyEvent("ctrl+r"));
registerCommand(context, 'extension.vim_ctrl_[', () => handleKeyEvent("ctrl+["));

registerCommand(context, 'extension.vim_ctrl_c', () => handleKeyEvent("ctrl+c"));
registerCommand(context, 'extension.vim_<', () => handleKeyEvent("<"));
registerCommand(context, 'extension.vim_>', () => handleKeyEvent(">"));

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@

{ "key": "Ctrl+[", "command": "extension.vim_ctrl_[", "when": "editorTextFocus" },
{ "key": "Ctrl+r", "command": "extension.vim_ctrl_r", "when": "editorTextFocus" },

{ "key": "Ctrl+c", "command": "extension.vim_ctrl_c", "when": "editorTextFocus" },
{ "key": "Shift+,", "command": "extension.vim_<", "when": "editorTextFocus" },
{ "key": "Shift+.", "command": "extension.vim_>", "when": "editorTextFocus" },
{ "key": "oem_102", "command": "extension.vim_oem_102", "when": "editorTextFocus" },
Expand Down
2 changes: 1 addition & 1 deletion src/mode/modeNormal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class NormalMode extends Mode {
}

ShouldBeActivated(key : string, currentMode : ModeName) : boolean {
return (key === 'esc' || key === 'ctrl+[');
return (key === 'esc' || key === 'ctrl+[' || key === "ctrl+c");
}

HandleActivation(key : string) : Thenable<{}> {
Expand Down
2 changes: 1 addition & 1 deletion test/mode/modeNormal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ suite("Mode Normal", () => {
teardown(cleanUpWorkspace);

test("can be activated", () => {
let activationKeys = ['esc', 'ctrl+['];
let activationKeys = ['esc', 'ctrl+[', 'ctrl+c'];
let motion = new Motion();
let modeHandler = new ModeNormal(motion);

Expand Down

0 comments on commit 3eae649

Please sign in to comment.