I know there are many similar questions, but none of them really helped me...
I have a very simple neovim cnofig file here:
~/.config/nvim/init.vim
which looks like
" Map jj to Esc in insert mode
inoremap jj <Esc>
" Map Space to toggle folds in normal mode
nnoremap <Space> za
I my vs code settings I have all this enabled:
"vim.neovimUseConfigFile": true,
"vim.neovimConfigPath": "~/.config/nvim/init.vim",
"vim.neovimPath": "/usr/bin/nvim
"vim.enableNeovim": true,
Yet, none of the two keymaps is working. What am I doing wrong? Do I have to set these keymaps in vs code directly?
As you did not specify it, I guess you are using this extension : https://github.com/VSCodeVim/Vim, as I recognize your settings here.
If so, if you just need keybindings like you describe, you don't really need the neovim feature (which is an experimental feature), and would rather use the following settings, as described here :
"vim.vimrc.enable": true,
"vim.vimrc.path": "........"
You can even remap keys from the settings.json if the settings in your init.vim file are not taken into account, with the following setting (from the readme):
"vim.insertModeKeyBindings": [
{
"before": ["j", "j"],
"after": ["<Esc>"]
}
]