i have tried but didnot find a way to search and replace in vscode with the vim keybindings plugin. The vim console doesn't take regular vims search and replace function :5,9s/foo/bar/g
and vscode's default Ctrl+f doesn't work either as it is a vim binding.
Asked
Active
Viewed 1.5k times
13

Muhammad usman
- 521
- 1
- 3
- 16

Lucas
- 133
- 1
- 1
- 7
-
I am using this vim plugin: https://github.com/VSCodeVim/Vim. – Lucas Mar 26 '19 at 08:29
4 Answers
18
If you want to use VSCode's default search functionality while using the Vim extension, you need to configure the extension .
"vim.handleKeys": { "<C-f>": false }
Check the documentation for more information.
Regarding the actual vim search functionality, I cannot confirm it not working. The example you provided works on my end.
Input:
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
foo
Running :5,9s/foo/bar/g
results in:
foo
foo
foo
foo
bar
bar
bar
bar
bar
foo
foo

Decay42
- 802
- 1
- 9
- 20
4
I have VSCode with Vim, and for me Ctrl+Shift+H
works equivalent to Ctrl+F
without Vim. For returning back to the file, press Ctrl+Tab
.

Zumitify
- 41
- 1
2
The extension "vscodevim" v1.21.10 does support regular vim search and replace functions such as:
:%s/"/'/g

teslae
- 239
- 1
- 5
0
In VSCodeVim, many Ex-commands require Neovim integration.
Setup:
- Install Neovim
- Enable Neovim via
vim.enableNeovim
- Set the Neovim path via
vim.neovimPath

mentoc3000
- 214
- 2
- 14