As the title suggests, I would like to find out if there's a way to prevent ST2 from opening binary files when I click on them. For example when I click on an image, there's no point displaying the hex representation inside the text editor.
One additional note: I'm not interested in hiding binary files from the sidebar.
If you open binary data (such as an image file) in a text editor, much of it won't make sense, because it does not fit your chosen interpretation (as text). What you call text is a subset of the possible file contents: Data that in a given character set translates to readable characters.
Open a session in Terminal, and use head -1 <path_to_your_file> to open the file. It'll read what it thinks is the first line and display it in the window. Or, instead, use file <path_to_your_file> to analyze the file and it'll tell you whether it thinks it's ASCII text, binary, or some other type.
Sublime Text editor is used as an Integrated Development Editor (IDE) like Visual Studio code and NetBeans.
Files containing null bytes are opened as hexadecimal by default In your User or Default Settings file:
"enable_hexadecimal_encoding": false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With