I'd like to have hlsearch set to true, so I see search highlighting when I'm using it, but I'd also like to be able to clear the search by simply hitting \ However, I can't seem to figure out how to reproduce this behavior in VSCodeVim. I've tried a few combinations of settings, and here's what I've got right now: Searches are highlighted as expected, but hitting \ The extension's readme contains this snippet: Putting that exact block in my settings doesn't seem to work either. There are various related tickets (most of which have been closed), and it seems it should be working, so maybe there's just something I'm missing.set hlsearch
noremap <ESC> :noh<CR><ESC>
"vim.hlsearch": true,
"vim.otherModesKeyBindingsNonRecursive": [
{
"before": ["<Esc>"],
"after": [],
"commands": [
{
"command": ":noh",
"args": []
}
]
}
],
"vim.otherModesKeyBindingsNonRecursive": [
{
"before":["<C-n>"],
"after":[],
"commands": [
{
"command": ":nohl",
"args": []
}
]
},
Related Issues:
https://github.com/VSCodeVim/Vim/issues/1166
https://github.com/VSCodeVim/Vim/issues/1047
https://github.com/VSCodeVim/Vim/issues/1053
normalModeKeyBindingsNonRecursiveworks okay with me
"vim.normalModeKeyBindingsNonRecursive": [
{
"before":["<Esc>"],
"commands": [
":nohl"
]
}
],
Most helpful comment
normalModeKeyBindingsNonRecursiveworks okay with me