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 58
  • Win 28
  • Mac 12
  • Linux 18
Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 3 0 0 0 2 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 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 0 0
Linux 0 0 0 0 0 0 0 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 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.