Skip to content

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

License

Notifications You must be signed in to change notification settings

Sheepolution/vimrc-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hold up! ⚠️

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.

.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 manually or run curl https://raw.githubusercontent.com/Sheepolution/vimrc-to-json/master/vimrc-to-json.py > 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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published