Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deactivate preview on right click

I'm on Windows (7 and XP, 64bit and 32bit). When I right click on a file, it opens inside the editor (which is handy sometimes, but mostly annoying, e.g. for pdf, etc.). Is there an option to stop sublime text from opening files on right click?

Note: I have the SideBarEnhancement plugin installed.

like image 687
adibender Avatar asked Nov 12 '13 17:11

adibender


1 Answers

This is the default action for the side bar - if you click on a file (right-click or left) a preview will open up in the editor. To avoid this, open Preferences -> Settings - User and add

"preview_on_click": false

to the file. Make sure to add a trailing comma if it's not the last entry in the list.

Another option is to ensure that certain file types are not displayed in the side bar. The defaults are:

"file_exclude_patterns": ["*.pyc", "*.pyo", "*.exe", "*.dll", "*.obj","*.o", "*.a", "*.lib", "*.so", "*.dylib", "*.ncb", "*.sdf", "*.suo", "*.pdb", "*.idb", ".DS_Store", "*.class", "*.psd", "*.db", "*.sublime-workspace"]

but you can add additional values in your Preferences - just make sure you include everything that's there already, or it won't be excluded. For example, you could add "*.pdf", "*.tif", "*.jpg", etc., depending on what type of files you encounter regularly.

Finally, you can exclude entire folders from being displayed - the defaults are:

"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS"]

so as to not display version control system directories, but you could just as easily add "images" for example if you do web development work.

Good luck!

like image 172
MattDMo Avatar answered Sep 24 '22 02:09

MattDMo