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

File​System Autocompletion

by lingo ALL

Auto-complete paths and filenames from the filesystem, à la Ctrl-X,Ctrl-F in VIM

Details

Installs

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

Readme

Source
raw.​githubusercontent.​com

FileSystem AutoCompletion

Enable auto-completion of paths from the file system à la VIM.

File completion can be explicitly triggered by Ctrl+Alt+/ (on OSX, Cmd instead of Ctrl) shortcut.

This combination can be always rebound to a different key combination in usual SublimeText manner, by opening the User keybindings file (see menu: Preferences/Package Settings/FileSystem Autocompletion).

For example, you should also be able to use the Vim shortcut Ctrl+X,Ctrl+F by adding the following to your Keybindings - User file:

{ "keys": ["ctrl+x","ctrl+f"], "command": "file_system_comp_trigger"}

This plugin handles spaces in file names and find the correct file path beginning. If you find any problem, please open an issue.

Current directory

The project-file directory will be used by default (if found). However, a path starting with '.' will use the current view's directory instead. The path search order can be configured via the usual settings file:

"path_search_order": ["project", "view", "window"]

Installation

Either by using the package manager or manually by cloning/downloading the latest snapshot of the master branch into the Sublime's package folder (e.g. ~/Library/Application Support/Sublime Text 3/Packages/ on OSX).

Spaces

This plugin should handle file paths that contains spaces including escaped spaces with \.

For example if there are three files:

quick test
quick test 1
quick test 2

Then quick test followed by our shortcut will display all three options and when selecting the second one for instance it will get expanded to quick test 1. On the other hand quick\ test followed by our shortcut with the same selection will be expanded to quick\ test\ 1. If the path is detected to be escaped it will continue to escape all the followed spaces.

File path beginning

The problem is that a file name can be contain many special characters. For example \input{some file} is a valid file. However, it is also a way how to include a file in LaTeX document and more likely we want to have a completion of the path some file rather than path \input{some file}. This plugin, therefore, tries to determine the beginning of a path from which it should look for the completion by finding the longest possible path that exists. For the example above, with the cursor positioned at the end of some file, it will try:

/Users/user/\input{some file
Users/user/\input{some file
krikava/\input{some file
\input{some file
input{some file
some file
file

and it will stop as soon as any of these path exists (a glob pattern with appended * returns something).

License

All parts of this plugin are licensed under GPL v3 (see LICENSE.txt).