Today I switched back to the open-source editor Visual Studio Code. But I realized that I can now work better with Vim! I have my custom key bindings which flow naturally.
You can edit settings in VS Code but some are hard to change. They are too deeply baked into the core functionality. A lot of key combinations are already taken or are used by different extensions.
For example, I use nvim-typescript for TypeScript language support. I have key mappings that easily allow me to navigate to type definitions.
VS Code also offers this feature out of the box. Go to Definition
is mapped F12
key which is hard to reach.
I tried to re-map to <space> tsd
, but that doesn’t work. The inbuilt keyboard shortcut editor only allows for two key presses.
I tried to use the Vim VSCode plugin to re-map the default settings. My idea was this:
vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<leader>", "t", "s", "d"],
"after": ["editor.action.revealDefinition"]
},
That doesn’t work and I don’t know why.
At that point I just went back to NeoVim.