sponsor Vim development Vim logo Vim Book Ad

Command-T : Fast file navigation for VIM

 script karma  Rating 774/527, Downloaded by 20359    Comments, bugs, improvements  Vim wiki

created by
Wincent Colaiuta
script type
The Command-T plug-in provides an extremely fast, intuitive mechanism for opening files with a minimal number of keystrokes. It's named "Command-T" because it is inspired by the "Go to File" window bound to Command-T in TextMate.

Files are selected by typing characters that appear in their paths, and are ordered by an algorithm which knows that characters that appear in certain locations (for example, immediately after a path separator) should be given more weight.

For more details and demonstration screencasts seen on the official Command-T website:


The latest version of the documentation can be viewed in the project Git repository:

install details
The preferred installation method is via Pathogen or some other plug-in management system, but if you really want to install from Vimball, open the vimball archive in Vim:

  vim command-t.vba

Then source it:

  :so %

The C extension must also be then compiled; for instance, if Vimball installs your plugin files in ~/.vim, then you would do this:

  cd ~/.vim/ruby/command-t
  ruby extconf.rb

Note that Command-T requires a version of VIM with Ruby support enabled, and it must be compiled using the same version of Ruby that Vim itself links against. For more details see the documentation.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
command-t-1.11.vba 1.11 2014-08-15 7.0 Wincent Colaiuta - improve edge-case handling in match results window code (patches from
  Richard Feldman)
- add "git" file scanner (patch from Patrick Hayes)
- speed-up when 'wildignore' is unset (patch from Patrick Hayes)
- add |g:CommandTTraverseSCM| setting which anchors Command-T's file finder to
  the nearest SCM directory (based on patches from David Szotten and Ben
- add AppStream metadata (patch from Vít Ondruch)
command-t-1.10.vba 1.10 2014-07-16 7.0 Wincent Colaiuta - improve tag finder performance by caching tag lists (patch from Artem
- consider the |'autowriteall'| option when deciding whether to open a file in
  a split
- make selection acceptance commands configurable (patch from Ole Petter Bang)
- add <C-w> mapping to delete previous word of the match prompt (patch from
  Kevin Webster)
- try harder to always clear status line after closing the match listing
  (patch from Ton van den Heuvel)
- don't allow MRU autocommands to produce errors when the extension has not
  been compiled
- add |g:CommandTIgnoreCase| and |g:CommandTSmartCase| options, providing
  support for case-sensitive matching (based on patch from Jacek Wysocki)
command-t-1.9.1.vba 1.9.1 2014-05-30 7.0 Wincent Colaiuta - include the file in the release vimball archive that was missing from the
  1.9 release
command-t-1.9.vba 1.9 2014-05-25 7.0 Wincent Colaiuta - improved startup time using Vim's autload mechanism (patch from Ross
- added MRU (most-recently-used) buffer finder (patch from Ton van den Heuvel)
- fixed edge case in matching algorithm which could cause spurious matches
  with queries containing repeated characters
- fixed slight positive bias in the match scoring algorithm's weighting of
  matching characters based on distance from last match
- tune memoization in match scoring algorithm, yield a more than 10% speed
command-t-1.8.vba 1.8 2014-04-01 7.0 Wincent Colaiuta - taught Watchman file scanner to use the binary protocol instead of JSON,
  roughly doubling its speed
- build changes to accommodate MinGW (patch from Roland Puntaier)
command-t-1.7.vba 1.7 2014-03-10 7.0 Wincent Colaiuta - added |g:CommandTInputDebounce|, which can be used to improve responsiveness
  in large file hierarchies (based on patch from Yiding Jia)
- added a potentially faster file scanner which uses the `find` executable
  (based on patch from Yiding Jia)
- added a file scanner that knows how to talk to Watchman
- added |g:CommandTFileScanner|, which can be used to switch file scanners
- fix processor count detection on some platforms (patch from Pavel Sergeev)
command-t-1.6.1.vba 1.6.1 2013-12-23 7.0 Wincent Colaiuta - defer processor count detection until runtime (makes it possible to sensibly
  build Command-T on one machine and use it on another)
command-t-1.6.vba 1.6 2013-12-16 7.0 Wincent Colaiuta - on systems with POSIX threads (such as OS X and Linux), Command-T will use
  threads to compute match results in parallel, resulting in a large speed
  boost that is especially noticeable when navigating large projects
command-t-1.5.1.vba 1.5.1 2013-09-24 7.0 Wincent Colaiuta - exclude large benchmark fixture file from source exports (patch from Vít
command-t-1.5.vba 1.5 2013-09-18 7.0 Wincent Colaiuta - don't scan "pathological" filesystem structures (ie. circular or
  self-referential symlinks; patch from Marcus Brito)
- gracefully handle files starting with "+" (patch from Ivan Ukhov)
- switch default selection highlight color for better readability (suggestion
  from André Arko), but make it possible to configure via the
  |g:CommandTHighlightColor| setting
- added a mapping to take the current matches and put then in the quickfix
- performance improvements, particularly noticeable with large file
- added |g:CommandTWildIgnore| setting (patch from Paul Jolly)
command-t-1.4.vba 1.4 2012-06-20 7.0 Wincent Colaiuta - added |:CommandTTag| command (patches from Noon Silk)
- turn off |'colorcolumn'| and |'relativenumber'| in the match window (patch
  from Jeff Kreeftmeijer)
- documentation update (patch from Nicholas Alpi)
- added |:CommandTMinHeight| option (patch from Nate Kane)
- highlight (by underlining) matched characters in the match listing (requires
  Vim to have been compiled with the +conceal feature, which is available in
  Vim 7.3 or later; patch from Steven Moazami)
- added the ability to flush the cache while the match window is open using
command-t-1.3.1.vba 1.3.1 2011-12-18 7.0 Wincent Colaiuta - fix jumplist navigation under Ruby 1.9.x (patch from Woody Peterson)
command-t-1.3.vba 1.3 2011-11-28 7.0 Wincent Colaiuta - added the option to maintain multiple caches when changing among
  directories; see the accompanying |g:CommandTMaxCachedDirectories| setting
- added the ability to navigate using the Vim jumplist (patch from Marian
command-t-1.2.1.vba 1.2.1 2011-05-01 7.0 Wincent Colaiuta - Remove duplicate copy of the documentation that was causing "Duplicate tag"
- Mitigate issue with distracting blinking cursor in non-GUI versions of Vim
  (patch from Steven Moazami)
command-t-1.2.vba 1.2 2011-04-30 7.0 Wincent Colaiuta - added |g:CommandTMatchWindowReverse| option, to reverse the order of items
  in the match listing (patch from Steven Moazami)
command-t-1.1b2.vba 1.1b2 2011-03-27 7.0 Wincent Colaiuta - fix a glitch in the release process; the plugin itself is unchanged since 1.1b
command-t-1.1b.vba 1.1b 2011-03-27 7.0 Wincent Colaiuta - add |:CommandTBuffer| command for quickly selecting among open buffers
command-t-1.0.1.vba 1.0.1 2011-01-05 7.2 Wincent Colaiuta - work around bug when mapping |:CommandTFlush|, wherein the default mapping
  for |:CommandT| would not be set up
- clean up when leaving the Command-T buffer via unexpected means (such as
  with <C-W k> or similar)
command-t-1.0.vba 1.0 2010-11-26 7.2 Wincent Colaiuta - make relative path simplification work on Windows
command-t-1.0b.vba 1.0b 2010-11-05 7.2 Wincent Colaiuta - work around platform-specific Vim 7.3 bug seen by some users (wherein
  Vim always falsely reports to Ruby that the buffer numbers is 0)
- re-use the buffer that is used to show the match listing, rather than
  throwing it away and recreating it each time Command-T is shown; this
  stops the buffer numbers from creeping up needlessly
command-t-0.8.1.vba 0.8.1 2010-09-14 7.2 Wincent Colaiuta - fix mapping issues for users who have set |'notimeout'| (patch from Sung Pae)
command-t-0.8.vba 0.8 2010-08-19 7.2 Wincent Colaiuta - overrides for the default mappings can now be lists of strings, allowing multiple mappings to be defined for any given action
- <Leader>t mapping only set up if no other map for |:CommandT| exists (patch from Scott Bronson)
- prevent folds from appearing in the match listing
- tweaks to avoid the likelihood of "Not enough room" errors when trying to open files
- watch out for "nil" windows when restoring window dimensions
- optimizations (avoid some repeated downcasing)
- move all Ruby files under the "command-t" subdirectory and avoid polluting the "Vim" module namespace
command-t-0.8b.vba 0.8b 2010-07-11 7.0 Wincent Colaiuta - large overhaul if the scoring algorithm to make the ordering of returned results more intuitive; given the scope of the changes and room for optimization of the new algorithm, this release is labelled as "beta"
command-t-0.7.vba 0.7 2010-06-10 7.0 Wincent Colaiuta - handle more |'wildignore'| patterns by delegating to VIM's own |expand()| function; with this change it is now viable to exclude patterns such as 'vendor/rails/**' in addition to filename-only patterns like '*.o' and '.git' (patch from Mike Lundy)
- always sort results alphabetically for empty search strings; this eliminates filesystem-specific variations (patch from Mike Lundy)
command-t-0.6.vba 0.6 2010-04-29 7.0 Wincent Colaiuta - |:CommandT| now accepts an optional parameter to specify the starting directory, temporarily overriding the usual default of VIM's |:pwd|
- fix truncated paths when operating from root directory
command-t-0.5.1.vba 0.5.1 2010-04-11 7.0 Wincent Colaiuta - fix for Ruby 1.9 compatibility regression introduced in 0.5
- documentation enhancements, specifically targetted at Windows users
command-t.vba 0.5 2010-04-03 7.0 Wincent Colaiuta - |:CommandTFlush| now re-evaluates settings, allowing changes made via |:let| to be picked up without having to restart VIM
- fix premature abort when scanning very deep directory hierarchies
- remove broken |<Esc>| key mapping on vt100 and xterm terminals
- provide settings for overriding default mappings
- minor performance optimization
command-t.vba 0.4 2010-03-27 7.0 Wincent Colaiuta - add |g:CommandTMatchWindowAtTop| setting (patch from Zak Johnson)
- documentation fixes and enhancements
- internal refactoring and simplification
command-t.vba 0.3 2010-03-24 7.0 Wincent Colaiuta - add |g:CommandTMaxHeight| setting for controlling the maximum height of the match window (patch from Lucas de Vries)
- fix bug where |'list'| setting might be inappropriately set after dismissing Command-T
- compatibility fix for different behaviour of "autoload" under Ruby 1.9.1
- avoid "highlight group not found" warning when run under a version of VIM that does not have syntax highlighting support
- open in split when opening normally would fail due to |'hidden'| and |'modified'| values
command-t.vba 0.2 2010-03-23 7.0 Wincent Colaiuta - compatibility fixes for compilation under Ruby 1.9 series
- compatibility fixes for compilation under Ruby 1.8.5
- compatibility fixes for Windows and other non-UNIX platforms
- suppress "mapping already exists" message if <Leader>t mapping is already defined when plug-in is loaded
- exclude paths based on |'wildignore'| setting rather than a hardcoded regular expression
command-t.vba 0.1 2010-03-22 7.2 Wincent Colaiuta Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo