When I right click on a file in the structure section of texstudio, one of the options is "show in explorer". Is there a way to define a shortcut for this option.


Keyboard shortcuts can be assigned only to Menu entries and to some basic editing functions as shown in the manual.

You can use a script in a personal macro and assign a keyboard shortcut to it.

This script will open the file explorer in the folder of the current file in the editor (uncomment the appropriate line for your operating system):

// needs TeXstudio v2.11.0 or newer
filename = app.getCurrentFileName()
workingDirectory = filename.substring(0, filename.lastIndexOf("/"))
//system("explorer .", workingDirectory) //for windows - tested
//system("xdg-open .", workingDirectory) //for linux - tested
//system("open .", workingDirectory) //for mac - untested
  • Worked like a charm for windows. But can explain more about the system command. I have other issues by this command in windows – Hamid Aug 12 '16 at 22:41
  • Dear alwaysask. please kindly see the link tex.stackexchange.com/questions/321534/… for example. – Hamid Aug 12 '16 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.