Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode vim search not working with forward slash

I'm trying to use the VSCode VIM keybindings plugin. - https://github.com/VSCodeVim/Vim

When I enter command mode, I can't seem to search, e.g. - :/foo

Also, when I highlight in visual mode, and enter command mode, there is not a selection present, e.g. - :'<,'>

Does anyone know if there is a config I need to enable for the plugin for these behaviors?

I see options that would suggest that at least search should be able to work. And the lexer for command mode definitely seems to suggest so, at least in the case of search via :/ (see this line from the plugin repo).

like image 627
jerome Avatar asked Oct 15 '18 19:10

jerome


People also ask

How to open keybindings JSON in VS Code?

File->Preferences->Keyboard Shortcuts Click on icon on top right corner that says "Open Keyboard Shortcuts(JSON)" to open JSON version and place the keybinding.

How do I enable VS Code in Vim?

Go to Extensions. Type vim in the search box. The first plugin named Vim is the one you want (VSCodeVim) Click on the install button.

How to add key bindings in VS Code?

All keyboard shortcuts in VS Code can be customized via the keybindings. json file. To configure keyboard shortcuts through the JSON file, open Keyboard Shortcuts editor and select the Open Keyboard Shortcuts (JSON) button on the right of the editor title bar. This will open your keybindings.


1 Answers

Aha. It seems the colon : does not need to precede search by slash (entering command mode).

In other words typing /foo directly from normal mode starts a search.

like image 79
jerome Avatar answered Oct 17 '22 22:10

jerome