Did you know that VsCodeVim as of version 1.12.0 supports .vimrc
files? So you might not even need this tool!
Set vim.vimrc.enable
to true
and set vim.vimrc.path
appropriately.
A Python script that converts a .vimrc
into a settings.json
for VSCodeVim.
-
Install Python 3.x
-
Download vimrc-to-json.py manually or run
curl https://raw.githubusercontent.com/Sheepolution/vimrc-to-json/master/vimrc-to-json.py > vimrc-to-json.py
-
Put your
.vimrc
andvimrc-to-json.py
in the same directory -
Run
vimrc-to-json.py
. It outputs asettings.json
for VSCodeVim.
.vim
nmap nt gg
nnoremap + <C-a>
vnoremap Y :w<CR>
settings.json
{
"vim.normalModeKeyBindings": [
{
"before": ["n", "t"],
"after": ["g", "g"]
}
],
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["+"],
"after": ["<C-a>"]
}
],
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": ["Y"],
"commands": [":w"]
}
]
}
This tool is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.