Search code examples
visual-studio-codekey-bindings

Is there a way to do this keybinding in Visual studio Code?


i recently switch from Sublime text to Vs code. i want to do add my sublime text keyboard shorcut for " < " and " > " by modify the keybinding.json

This is what i have tried :

[
    { "keys": ["ctrl+j"], "command": "insert", "args": {"characters": "<"} },
    { "keys": ["ctrl+k"], "command": "insert", "args": {"characters": ">"} }]

but not working in Vs code


Solution

  • In keybinding.json file, this should work:

    {
        "key": "ctrl+j",
        "command": "type",
        "args": { "text": "<" }
    },
    {
        "key": "ctrl+k",
        "command": "type",
        "args": { "text": ">" }
    }