A Python script that converts a .vimrc file to a settings.json for VSCodeVim.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vimrc Initial commit Feb 8, 2019
LICENSE Initial commit Feb 8, 2019
README.md Initial commit Feb 8, 2019
settings.json
vimrc-to-json.py Initial commit Feb 8, 2019

README.md

.vimrc to JSON

A Python script that converts a .vimrc into a settings.json for VSCodeVim.

How to use

  1. Install Python 3.x

  2. Download vimrc-to-json.py

  3. Put your .vimrc and vimrc-to-json.py in the same directory

  4. Run vimrc-to-json.py. It outputs a settings.json for VSCodeVim.

Example

.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"]
		}
	]
}

License

This tool is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.