Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 2 - "reopen with encoding" key binding

Is there a way to define a key binding to reopen current file with another specific encoding? Say, ctrl + alt + w to reopen current file with Windows-1251 ?

Sublime lacks success at detecting this encoding, and using File - Reopen with encoding .. just takes too much time when I work with lots of files in Windows-1251.

like image 936
madfriend Avatar asked Jul 04 '13 11:07

madfriend


People also ask

How do I change key bindings in Sublime Text?

Users can customize their key bindings by creating a file named Default. sublime-keymap in their Packages/User/ directory. For example, the following will create a key binding to show unsaved changes, if any exist, via Ctrl+Shift+`.

Can Sublime Text run on 32 bit?

Sublime Text runs on the Windows, Mac and Linux operating systems. 32bit (x86), 64bit (x86_64) and ARM (arm64) processors are supported.

Is there a free version of Sublime Text?

Sublime Text may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation.


1 Answers

You can add this to your Preferences > Key Bindings - User file.

 {
    "keys": ["ctrl+alt+w"],
    "command": "reopen", "args": {"encoding": "Cyrillic (Windows 1251)" }
 }
like image 60
AGS Avatar answered Oct 02 '22 16:10

AGS