Sublime Forum

Assigning a shortcut for encoding related operations

#1

Hello,

I am using Sublime Text v4. I am a newbie to it.

  • Frequently, I need to reload file in Win1254 encoding.
  • Frequently, I need to convert file encoding to UTF8 with BOM.

I wanted to set a shortcut for these so it would be more convenient. I failed to find if that is possible at all.

Any help is appreciated.

Thanks & Regards,
Ertan

0 Likes

#2

You can make a custom keybinding. The command can be found by enabling command logging and performing the action you want to bind.

1 Like

#3

Thanks for information.
Managed to do that using below keymap settings

[
	{
        "keys": ["ctrl+shift+t"],
        "command": "reopen",
        "args": {"encoding": "Turkish (Windows 1254)"}
    },
    {
        "keys": ["ctrl+shift+u"],
        "command": "save",
        "args": {"async": true, "encoding": "utf-8 with bom"}
    }, 
]
0 Likes