diff --git a/README.md b/README.md index 511be9fe..b35146a7 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,12 @@ Set to `true` to start in Insert mode when opening files. Set to `true` to will make line numbers relative when not in Insert mode. +#### `amVim.mimicVimSearchBehavior` + +`Boolean`, Default: `true` + +Set to `false` to keep VSCode's keybinding when searching. + #### `amVim.vimStyleNavigationInListView` `Boolean`, Default: `true` diff --git a/package.json b/package.json index b731330a..0a73da5a 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,11 @@ "default": false, "description": "Set to `true` to will make line numbers relative when not in Insert mode." }, + "amVim.mimicVimSearchBehavior": { + "type": "boolean", + "default": true, + "description": "Set to `false` to keep VSCode's keybinding when searching." + }, "amVim.vimStyleNavigationInListView": { "type": "boolean", "default": true, @@ -80,7 +85,7 @@ { "command": "amVim.ctrl+f", "key": "ctrl+f", "when": "editorTextFocus && amVim.configuration.shouldBindCtrlCommands && amVim.mode != 'INSERT'" }, { "command": "amVim.ctrl+b", "key": "ctrl+b", "when": "editorTextFocus && amVim.configuration.shouldBindCtrlCommands && amVim.mode != 'INSERT'" }, - { "key": "enter", "command": "amVim.executeNativeFind", "when": "editorFocus && findInputFocussed && findWidgetVisible" }, + { "key": "enter", "command": "amVim.executeNativeFind", "when": "amVim.configuration.shouldMimicVimSearchBehavior && editorFocus && findInputFocussed && findWidgetVisible" }, { "key": "j", "command": "list.focusDown", "when": "amVim.configuration.shouldUseVimStyleNavigationInListView && listFocus && !inputFocus" }, { "key": "k", "command": "list.focusUp", "when": "amVim.configuration.shouldUseVimStyleNavigationInListView && listFocus && !inputFocus" }, diff --git a/src/Configuration.ts b/src/Configuration.ts index 5836e849..e4aa7e47 100644 --- a/src/Configuration.ts +++ b/src/Configuration.ts @@ -46,9 +46,17 @@ export class Configuration { private static updateKeybindingContexts(): void { commands.executeCommand('setContext', - 'amVim.configuration.shouldBindCtrlCommands', this.getExtensionSetting('bindCtrlCommands', true)); + 'amVim.configuration.shouldBindCtrlCommands', + this.getExtensionSetting('bindCtrlCommands', true) + ); + commands.executeCommand('setContext', + 'amVim.configuration.shouldMimicVimSearchBehavior', + this.getExtensionSetting('mimicVimSearchBehavior', true) + ); commands.executeCommand('setContext', - 'amVim.configuration.shouldUseVimStyleNavigationInListView', this.getExtensionSetting('vimStyleNavigationInListView', true)); + 'amVim.configuration.shouldUseVimStyleNavigationInListView', + this.getExtensionSetting('vimStyleNavigationInListView', true) + ); } static getExtensionSetting(section: string, defaultValue: T): T {