VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.57k stars 1.3k forks source link

:inoremap jj <Esc> in vimrc not imported #9035

Closed stephanedebove closed 2 months ago

stephanedebove commented 2 months ago

Type: Bug

I have imported my vimrc on Windows. All commands work, except this one:

:inoremap jj <Esc>

Directly setting the mapping as

"vim.insertModeKeyBindings": [
        {
            "before": ["j", "j"],
            "after": ["<Esc>"]
        }
    ]

in settings.json works.

Extension version: 1.27.2 VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z) OS version: Windows_NT x64 10.0.19045 Modes:

yaoyhu commented 2 months ago

Set vim.vimrc.enable to true and set vim.vimrc.path appropriately.

It is not allowed to add : into your vimrc file. Or can you share your .vimrc file?

stephanedebove commented 2 months ago

hey @yaoyhu Thanks for the reply. These settings were already set, but the problem was indeed this typo :. Vim seems to accept it, but not the Vim extension.