vmware-archive / sublime-text

Salt-related syntax highlighting and snippets for Sublime Text
Other
54 stars 10 forks source link

Large file previews cause freezing/crashing #18

Closed xanderflood closed 4 years ago

xanderflood commented 5 years ago

When I open the Goto menu (cmd+P on macOS, for instance) I often run into an issue where, while searching for the file I need, I pass over a very large file (typically an executable) and sublime freezes for a time while it tries to load the file, or sometimes even crashes while loading the preview. It would be great to be able to disable automatically displaying file previews for executables or for files above a certain size.

This may already be an available in the Preferences file, but I was only able to find an option to disable previews atogether, which is a good workaround but I'd prefer not to use that in general. There's also an option to exclude "binary" files from the Goto menu by extension, but the issue is that unlike other binary files, executables outside of windows don't generally have any extension, so an alternative approach is needed.

Based on the way the file contents display, it seems like Sublime is able to detect that the file it's opening is a binary file, and it shows neatly formatted bytes rather than trying to render them as unicode characters - would it be possible to disable previews for files based on their character encoding, for instance?

xanderflood commented 4 years ago

Wrong repo!