Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
Commands/ | Fri Feb 27 01:32:50 -0800 2009 | |
| |
LICENSE | Fri Feb 27 23:05:10 -0800 2009 | |
| |
README.markdown | Sun Mar 22 00:13:29 -0700 2009 | |
| |
Support/ | Mon Mar 23 10:19:39 -0700 2009 | |
| |
info.plist | Wed Feb 25 00:37:22 -0800 2009 |
Outline
“GoToFile” imitates TextMate’s “Go to File…” ⌘T functionality see here. In addition it is possible to narrow down the list of files by considering (parts of) the file path using '/' as a delimiter.
Furthermore it is not only possible to open the selected file in TextMate but also to:
- open the selected file in the default application (by using “open”)
- activate QuickLook
- insert the relative path from the current file (that file which had the focus while invoking “GoToFile”) to the selected one
- insert the absolute path.
The list of found files is sorted by the score which is calculated inside of Jamis Buck's “Fuzzy File Finder” routine. If the letters typed in match word prefixes (as mf does in my_file.txt), the match is usually prioritised. The maximum number of outputted files is set to 100 (can be changed in “FileFinder.rb” line 4).
To ignore certain files add a TextMate shell variable called TM_FUZZYFINDER_IGNORE, in it put the file globs separated by commas. For example: '*.pyc,*.zip,*.gz,*.bz,*.tar,*.jpg,*.png,*.gif,*.avi,*.wmv,*.ogg,*.mp3,*.mov'.
As default there is a limit of 10.000 files in the tree structure. To increase/decrease that maximum number add the TextMate shell variable TM_FUZZYFINDER_CEILING and set it accordingly.
This GUI makes usage of makes usage of Jamis Buck's “Fuzzy File Finder” and was inspired by Amiel Martin's FuzzyFileFinder.tmbundle which a few code fragments are taken from.
Installation
by using “GetBundles”
by using “git”:
cd ~/Library/Application\ Support/TextMate/Bundles/ git clone git://github.com/amiel/gotofile.tmbundle.git GoToFile.tmbundle
- by downloading this zip archive, decompressing it, renaming it to “GoToFile.tmbundle”, and finally double-clicking at it
Usage
⇧⌘K invokes “GoToFile”. The root directory will be taken from $TM_PROJECT_DIRECTORY || $TM_DIRECTORY || current directory. “GoToFile” won't work on unsaved documents. There is a tool-tip to display the entire file path.
Input Field
Type characters in order to narrow down the list of files. The dialogue will be updated while typing. To search only in certain folders type for instance: s/rb or s/li/mm etc. If the letters match word prefixes (as mf does in my_file.txt), the match is usually prioritized.
If you would like to search for the file and then narrow down to subdirectory, you can type rb\s or mm\li\s.
Normally spaces are ignored. If one wants to look for a space one has to escape the space: \␣
Shortcuts
- CLICK or ↩ opens the file in TextMate
- ⌥ CLICK or ⌥↩ opens the file with the default application
- ⇧ CLICK or ⇧↩ inserts the relative file path
- ⇧⌥ CLICK or ⇧⌥↩ inserts the absolute file path
- SPACE toggles the QuickLook mode (Leopard only)
- ⌥ SPACE adds an (escaped) space character in the search query
- ↑ and ↓ resp. ⇥ and ⇧⇥ navigates through the list of files
- PAGE UP and PAGE DOWN up or down by 10 lines at a time
- ^F sets the focus to the input field
- ⌘W or ESC closes the “GoToFile” window
Official Git Repos
Can be found here: http://github.com/amiel/gotofile.tmbundle
ToDo / wish list
- window should close when a file is opened (maybe configurable as it seems that some people like that it stays open)
- take out duplicate files
- refactor some code into fuzzy_file_finder.rb from file_finder.rb
also check out the todo list on the github wiki
Contributions
- Jamis Buck — fuzzy_file_finder library - jamis@37signals.com
- Amiel Martin amiel.martin@gmail.com - Hans-Jörg Bibiko bibiko@eva.mpg.de - Eric Doughty-Papassideris github:ddlsmurf - Travis Jeffery t.jeffery@utoronto.ca - Eric O'Connell github:drd - Nathan Carnes github:nathancarnes







