Forked from hoffstein/Default (Windows).sublime-keymap
Last active
December 16, 2015 03:49
-
-
Save Aaron3/5372437 to your computer and use it in GitHub Desktop.
Quick script to open a file's parent folder in the file manager in ubuntu. #Install to ~/.config/sublime-text-3/Packages/User/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_nautilus" } | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin, os, subprocess | |
class OpenFolderInNautilusCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
if self.view.file_name(): | |
folder_name, file_name = os.path.split(self.view.file_name()) | |
self.view.window().run_command('exec', {'cmd': ['nautilus ' + folder_name], 'shell':True} ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment