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

Fuzzy​File​Path

by sagold ALL

Autocomplete relative or absolute file paths in Sublime Text project folder

Details

  • 2019.04.03.06.52.42
    2014.11.24.13.10.08
  • github.​com
  • github.​com
  • 5 years ago
  • 2 hours ago
  • 10 years ago

Installs

  • Total 41K
  • Win 21K
  • Mac 12K
  • Linux 7K
Jul 27 Jul 26 Jul 25 Jul 24 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
Windows 0 1 0 0 1 1 1 1 1 0 0 1 1 0 1 2 3 0 0 0 1 0 0 2 0 0 1 3 1 2 0 1 0 0 0 1 1 1 1 1 1 0 3 0 0 1
Mac 0 0 2 0 0 0 0 0 1 0 0 0 1 0 1 0 0 2 1 0 0 0 2 2 0 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 0
Linux 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 2 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

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 $: “js "word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}~?”

## Customization

For further details about troubleshooting, customization, settings and keybindings please
[refer to the Wiki](https://github.com/sagold/FuzzyFilePath/wiki)

Trying to integrate other languages? See the
[auto complete Python package tutorial](https://github.com/sagold/FuzzyFilePath/wiki/Tutorial:-Add-support-for-python-packages)


#### Related Plugins

##### [AutoFileName](https://github.com/BoundInCode/AutoFileName)

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