Created
May 2, 2022 15:06
-
-
Save haliphax/c82e8358dfd0d4cfa34a3a2a3fea646b to your computer and use it in GitHub Desktop.
Vim mode-dependent relative line numbers for VS Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// plugins used: | |
// - https://marketplace.visualstudio.com/items?itemName=vscodevim.vim | |
// - https://marketplace.visualstudio.com/items?itemName=hoovercj.vscode-settings-cycler | |
{ | |
"editor.lineNumbers":"relative", | |
"settings.cycle":[ | |
{ | |
"id":"lineNumber", | |
"overrideWorkspaceSettings":false, | |
"values":[ | |
{ | |
"editor.lineNumbers":"on" | |
}, | |
{ | |
"editor.lineNumbers":"relative" | |
} | |
] | |
} | |
], | |
"vim.insertModeKeyBindings":[ | |
{ | |
"before":[ | |
"<Esc>" | |
], | |
"after":[ | |
"<Esc>" | |
], | |
"commands":[ | |
{ | |
"command":"settings.cycle.lineNumber" | |
} | |
] | |
} | |
], | |
"vim.normalModeKeyBindings": [ | |
{ | |
"before":[ | |
"i" | |
], | |
"after":[ | |
"i" | |
], | |
"commands":[ | |
{ | |
"command":"settings.cycle.lineNumber" | |
} | |
] | |
}, | |
{ | |
"before":[ | |
"I" | |
], | |
"after":[ | |
"I" | |
], | |
"commands":[ | |
{ | |
"command":"settings.cycle.lineNumber" | |
} | |
] | |
}, | |
{ | |
"before":[ | |
"a" | |
], | |
"after":[ | |
"a" | |
], | |
"commands":[ | |
{ | |
"command":"settings.cycle.lineNumber" | |
} | |
] | |
}, | |
{ | |
"before":[ | |
"A" | |
], | |
"after":[ | |
"A" | |
], | |
"commands":[ | |
{ | |
"command":"settings.cycle.lineNumber" | |
} | |
] | |
}, | |
{ | |
"before":[ | |
"o" | |
], | |
"after":[ | |
"o" | |
], | |
"commands":[ | |
{ | |
"command":"settings.cycle.lineNumber" | |
} | |
] | |
}, | |
{ | |
"before":[ | |
"O" | |
], | |
"after":[ | |
"O" | |
], | |
"commands":[ | |
{ | |
"command":"settings.cycle.lineNumber" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment