Markski
Markski

Reputation: 21

Binding a key to a combination in Sublime Text 3

I have seen this question asked a few many times on the site, but I have a different issue here.

All websites and such regardin binding are about commands, but what I want is a key.

I am using a new notebook, and I am really happy with it, but I have a mayor issue I didn't give attention to before buying: I don't have the > and < keys. Using alt and the respective ASCII codes are a big no because it doesn't has a dedicated keypad, but rather a FN key mumbo jumbo thing I dont want to deal with.

I'd like to know if there's a way to use an unexisting convination (like alt + z and alt + x) to write these characters in Sublime Text 3

Thanks for your attention.

Upvotes: 0

Views: 118

Answers (1)

Alex Palcuie
Alex Palcuie

Reputation: 4984

Even though it would be recommended to solve this problem at the OS level, you can use key bindings for it.

In your Key Bindings - User section add:

{ "keys": ["1"], "command": "insert", "args": {"characters": "<"}},
{ "keys": ["2"], "command": "insert", "args": {"characters": ">"}},

And replace 1 and 2 with the characters you want to insert the angle brackets.

Upvotes: 1

Related Questions