Skip to content

stevenchanin/gotofile.tmbundle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/stevenchanin/gotofile.tmbundle.git GoToFile.tmbundle

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
  • By default, these actions will close the search window. To keep the search window open, press ^↩ (the control key)
  • 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 - [email protected] 
-  Amiel Martin  [email protected]
-  Hans-Jörg Bibiko  [email protected]
-  Eric Doughty-Papassideris  github:ddlsmurf
-  Travis Jeffery  [email protected]
-  Eric O'Connell   github:drd
-  Nathan Carnes  github:nathancarnes

About

Bringing Jamis's FuzzyFileFinder back to textmate.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%