Autocomplete relative or absolute file paths in Sublime Text project folder
Clone or download
Latest commit 970a3b5 May 6, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
common Revert "Revert "Add new setting to add new scopes to the defaults"" Mar 11, 2018
project Change filecache to exclude folder based on relative path Apr 1, 2017
test Documentation of sublimes completion triggers Sep 11, 2016
.gitignore Add ignore sublime project files Feb 28, 2015
.npmignore Add npm ignore Nov 23, 2014
CHANGES.md Bump version to v0.6.0 May 6, 2018
Default (Linux).sublime-keymap Add command goto file as shortcut Mar 11, 2015
Default (OSX).sublime-keymap Add command goto file as shortcut Mar 11, 2015
Default (Windows).sublime-keymap Add command goto file as shortcut Mar 11, 2015
Default.sublime-commands Add command palette support Oct 10, 2016
Default.sublime-keymap Add command goto file as shortcut Mar 11, 2015
FuzzyFilePath.md Bump version to v0.6.0 May 6, 2018
FuzzyFilePath.sublime-settings Add json as valid js extension May 6, 2018
FuzzyFilePathDemo.gif Update slideshow gif Nov 23, 2014
LICENSE Change cleanup to be performed everytime Oct 26, 2014
Main.sublime-menu Change to use the new edit_settings command Sep 23, 2017
ProjectListener.py Refactor move method to owner Sep 11, 2016
QueryCompletionListener.py Fixed issue, Line 641, in __getitem__ raise IndexError() Jun 14, 2017
README.md Cleanup Sep 11, 2016
TestRunner.py Refactor separate unit and integration tests Jul 8, 2016
ViewListener.py Move temp file logic to viewlistener Sep 11, 2016
command_goto_file.py Add check real filepath if not found in cache Apr 1, 2017
command_insert_path.py Fix wrong key name Sep 11, 2016
command_rebuild_cache.py Refactor change setting properties to be always lowercase Sep 11, 2016
command_replace_region.py Cleanup Sep 11, 2016
command_show_context.py Remove unused parameter Sep 11, 2016
command_show_current_settings.py Add support for settings in project folders Sep 11, 2016
command_show_info.py Add support for settings in project folders Sep 11, 2016
completion.py Refactor remove view abstraction Sep 11, 2016
controller.py Refactor rename variable Sep 18, 2016
current_state.py Refactor remove view abstraction Sep 11, 2016
expression.py Replace print statements with logger calls Sep 11, 2016
query.py Fix wrong property name Sep 11, 2016

README.md

FuzzyFilePath

Sublime Text Plugin

Fuzzy search and insert filenames inside your current project directory. Highly customizable.


Basic settings support Javascript, HTML, CSS, PHP and glsl, but may be adjusted for most languages

Installation

Package Control

After Package Control installation, restart Sublime Text. Use the Command Palette Cmd+Shift+P (OS X) or Ctrl+Shift+P (Linux/Windows) and search for Package Control: Install Package. Wait until Package Control downloaded the latest package list and search for FuzzyFilePath.

github

in <SublimeConfig>/Packages/ call: git clone https://github.com/sagold/FuzzyFilePath.git

Sublime Text 2

in <SublimeConfig>/Packages/FuzzyFilePath/ switch to Sublime Text 2 Branch with: git checkout st2

Attention: Sublime Text 2 will no longer be supported.

Usage

Filepaths will be suggested if there is a matching trigger for the current context and its property auto is set to true. For a matching trigger, filepath completions may be forced (ignoring auto property) by the following shorcuts:

  • Ctrl+Alt+Space inserts filepaths relative, overriding possible settings
  • Ctrl+Shift+Space inserts filepaths absolute, overriding possible settings

The current string may modify the suggested filepaths by the following rules:

  • word suggests all matching files by the type (relative or absolute) as specified in the matched rule
  • ./ suggests matching files within the current directory and inserts selection relative
  • ../ suggests all matching files and inserts selection relative
  • /folder suggests all matching files and insert selection absolute

FuzzyFilePath is disabled for single files or files outside the opened folder.

Open File

Use Alt+Enter to open the file under cursor

Configure Completion Panel

Ensure you have autocompletion activated for Sublime. In those cases, where the autocompletion panel is still not opened (for any type of completions), you may extend auto_complete_triggers to add special rules for the completion panel to show up. i.e. enabling autocompletion for latex \input{"path/to/asset"}, you could add:

"auto_complete_triggers":
[
	{
		"characters": "abcdefghijklmnopqrstuvwxyz",
		"selector": "text.tex.latex"
	}
]

or enabling html completion for <script src="path/to/script">

"auto_complete_triggers":
[
	{
		"characters": "abcdefghijklmnopqrstuvwxyz",
		"selector": "string.quoted.double.html"
	}
]

Special Characters

If your projects contains filenames with special characters, consider modifying Sublime Texts word_separators.

i.e. in AngularJs filenames may start with $. In Sublime Text | Preferences | Settings - User redeclare word separators, removing $:

	"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"

Customization

For further details about troubleshooting, customization, settings and keybindings please refer to the Wiki

Trying to integrate other languages? See the auto complete Python package tutorial

Related Plugins

AutoFileName
  • uses file discovery based on current directory instead of fuzzy search
  • adds properties for images in autocompletion description