Key binding for character insertion won't work in sublime text 3

1

I am trying to make my sublime text 3 instert a "<" character if I press alt + z, and ">" if I insert alt + x since my keyboard has no <> keys. I managed to make this work properly in Sublime Text 2 a few months ago but I forgot how I did that.

After finding this and this document online I figured the right way to do it would be having this in Default (windows.sublime-keymap) in the user folder.

[
    { "keys": ["ctrl+k", "alt+z"], "command": "insertCharacters", "args": "<" },
    { "keys": ["ctrl+k", "alt+x"], "command": "insertCharacters", "args": ">" }
]

However, this seems to have done absolutely nothing. What am I doing wrong?

Markski

Posted 2018-08-24T04:41:44.440

Reputation: 63

Answers

0

I managed to solve this myself. This is what I had to do:

{ "keys": ["alt+z"], "command": "insert", "args": {"characters": "<"} },
{ "keys": ["alt+x"], "command": "insert", "args": {"characters": ">"} }

Markski

Posted 2018-08-24T04:41:44.440

Reputation: 63