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