Created
July 2, 2021 10:57
-
-
Save byassine52/d2bc03471bedf6a91599ba00ea99af06 to your computer and use it in GitHub Desktop.
Sublime Text 3 - Plugin to "Open File by Path" quick access
This file contains hidden or 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
... | |
//////////////////////////////// | |
// Open File by Path shortcut // | |
//////////////////////////////// | |
{ "keys": ["ctrl+shift+o"], "command": "open_file_by_path" }, | |
... |
This file contains hidden or 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 | |
def open_file(window, filename): | |
window.open_file(filename, sublime.ENCODED_POSITION) | |
class OpenFileByPathCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
def done_callback(filename): | |
open_file(self.window, filename) | |
self.window.show_input_panel("Open File by Path: ", "", done_callback, None, None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment