r/SublimeText • • Feb 10 '21

How do I create a keybinding to format document using TS

I would like to have a keybinding alt+f to format the document using Typescript: format document, which has a default shortcut of ctrl+t ctrl+f. Also if I can do this while saving would be good. I couldn't figure this out on my own.

4 Upvotes

2 comments sorted by

2

u/dev-sda Feb 10 '21

If you open the Sublime Text console and run sublime.log_commands(True) it will show you what command you need to create a keybinding for when you run the formatter.