Skip to content

Commit

Permalink
Merge pull request #190 from VSCodeVim/search
Browse files Browse the repository at this point in the history
Search '/' in Command Mode
  • Loading branch information
jpoon committed Mar 18, 2016
2 parents 2abd9f5 + 7223d35 commit 5e9fb8d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function activate(context: vscode.ExtensionContext) {
registerCommand(context, 'extension.vim_space', () => handleKeyEvent("space"));
registerCommand(context, 'extension.vim_left_curly_bracket', () => handleKeyEvent("{"));
registerCommand(context, 'extension.vim_right_curly_bracket', () => handleKeyEvent("}"));
registerCommand(context, 'extension.vim_forwardslash', () => handleKeyEvent("/"));

registerCommand(context, 'extension.vim_a', () => handleKeyEvent("a"));
registerCommand(context, 'extension.vim_b', () => handleKeyEvent("b"));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
{ "key": "\\", "command": "extension.vim_backslash", "when": "editorTextFocus" },
{ "key": "Shift+[", "command": "extension.vim_left_curly_bracket", "when": "editorTextFocus" },
{ "key": "Shift+]", "command": "extension.vim_right_curly_bracket", "when": "editorTextFocus" },
{ "key": "/", "command": "extension.vim_forwardslash", "when": "editorTextFocus" },

{ "key": "a", "command": "extension.vim_a", "when": "editorTextFocus" },
{ "key": "b", "command": "extension.vim_b", "when": "editorTextFocus" },
Expand Down
1 change: 1 addition & 0 deletions src/mode/modeNormal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {TextEditor} from './../textEditor';
export class NormalMode extends Mode {
protected keyHandler : { [key : string] : (motion : Motion) => Promise<{}>; } = {
":" : async () => { return showCmdLine("", this._modeHandler); },
"/" : async () => { return vscode.commands.executeCommand("workbench.view.search"); },
"u" : async () => { return vscode.commands.executeCommand("undo"); },
"ctrl+r" : async () => { return vscode.commands.executeCommand("redo"); },
"h" : async (c) => { return c.left().move(); },
Expand Down

0 comments on commit 5e9fb8d

Please sign in to comment.