ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Better​Go​To​File

by Suor ST3

Open file paths under cursor in Sublime Text

Details

Installs

  • Total 23
  • Win 8
  • Mac 5
  • Linux 10
Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9
Windows 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
Mac 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Linux 0 0 0 0 0 2 0 0 0 0 0 0 0 0 3 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

BetterGoToFile

Open file path under cursor in Sublime Text.

If path resolves to a single file in current project, it is opened right away. If several files match, you get a quick panel to choose one.

Supported forms:

path/to/file.py
path/to/file.py:42
"path/to/file.py"
'/absolute/path/to/file.py'

Shortcut

Add a key binding to your user keymap:

[
    {"keys": ["ctrl+enter"], "command": "goto_file"}
]

Use whatever key you prefer. The command is also available from the command palette as “BetterGoToFile: Open File at Cursor”.

If no path is found or nothing matches, the plugin falls back to Sublime's goto_definition command by default. You can change that in BetterGoToFile.sublime-settings:

{
    "fallback_command": "goto_definition",
    "fallback_args": {},
    "excluded_dirs": [".git", "node_modules", "__pycache__", ".venv"]
}

Project files are cached for a few minutes to avoid walking the same folders on every command run.