command-t 3.0.2 → 4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -2
  3. data/doc/command-t.txt +312 -147
  4. data/ruby/command-t.rb +13 -12
  5. data/ruby/command-t/controller.rb +86 -15
  6. data/ruby/command-t/depend +4 -0
  7. data/ruby/command-t/ext.h +9 -2
  8. data/ruby/command-t/extconf.rb +2 -2
  9. data/ruby/command-t/finder.rb +6 -2
  10. data/ruby/command-t/finder/buffer_finder.rb +3 -3
  11. data/ruby/command-t/finder/command_finder.rb +23 -0
  12. data/ruby/command-t/finder/file_finder.rb +3 -3
  13. data/ruby/command-t/finder/help_finder.rb +25 -0
  14. data/ruby/command-t/finder/history_finder.rb +27 -0
  15. data/ruby/command-t/finder/jump_finder.rb +3 -3
  16. data/ruby/command-t/finder/line_finder.rb +23 -0
  17. data/ruby/command-t/finder/mru_buffer_finder.rb +3 -3
  18. data/ruby/command-t/finder/tag_finder.rb +3 -3
  19. data/ruby/command-t/heap.c +146 -0
  20. data/ruby/command-t/heap.h +22 -0
  21. data/ruby/command-t/match.c +183 -116
  22. data/ruby/command-t/match.h +16 -10
  23. data/ruby/command-t/match_window.rb +10 -1
  24. data/ruby/command-t/matcher.c +203 -63
  25. data/ruby/command-t/metadata/fallback.rb +2 -2
  26. data/ruby/command-t/mru.rb +2 -2
  27. data/ruby/command-t/path_utilities.rb +2 -2
  28. data/ruby/command-t/progress_reporter.rb +38 -0
  29. data/ruby/command-t/prompt.rb +4 -4
  30. data/ruby/command-t/scanner.rb +22 -2
  31. data/ruby/command-t/scanner/buffer_scanner.rb +3 -3
  32. data/ruby/command-t/scanner/command_scanner.rb +33 -0
  33. data/ruby/command-t/scanner/file_scanner.rb +30 -6
  34. data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +12 -7
  35. data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +11 -8
  36. data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +7 -4
  37. data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +13 -5
  38. data/ruby/command-t/scanner/help_scanner.rb +40 -0
  39. data/ruby/command-t/scanner/history_scanner.rb +24 -0
  40. data/ruby/command-t/scanner/jump_scanner.rb +3 -3
  41. data/ruby/command-t/scanner/line_scanner.rb +45 -0
  42. data/ruby/command-t/scanner/mru_buffer_scanner.rb +3 -3
  43. data/ruby/command-t/scanner/tag_scanner.rb +3 -3
  44. data/ruby/command-t/scm_utilities.rb +2 -2
  45. data/ruby/command-t/settings.rb +2 -2
  46. data/ruby/command-t/stub.rb +7 -2
  47. data/ruby/command-t/util.rb +2 -2
  48. data/ruby/command-t/vim.rb +27 -2
  49. data/ruby/command-t/vim/screen.rb +3 -3
  50. data/ruby/command-t/vim/window.rb +3 -3
  51. data/ruby/command-t/watchman.c +1 -1
  52. metadata +13 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5145bcaab263f39de8e128821e41a0faaac76e8
4
- data.tar.gz: 543a970eb799dbd8264ff9c7973f0d9c24719667
3
+ metadata.gz: fe0c88c55ccf81debb55313b6cd621a154fd4d4c
4
+ data.tar.gz: 326424cad8c6cb0270afaf7e66ce40de656a84be
5
5
  SHA512:
6
- metadata.gz: 47ce4b41ed86d3e009a5277b68dcc6d1fd412e3cc3bfd15913c93ab7be754f1415223c1b730958adc767cbcc8a69309c04ee4475d389cc9ace5fd9689ffb3788
7
- data.tar.gz: 9c72f3aac50547abe3f1139d988ca0bcd3e2be2832686a9cceb77b06934c217618013293099a202993343137188da5d267284cfa264f998b58c13ad8c514c091
6
+ metadata.gz: c2158b04f5f46b01275f2bf2b4f6d50da93741899906aeda8d2e87f35d380f0d37901429ce9cbe10277af2b974f4d3c6e2489cb5cb5c9d9123be1f1cf3e5b9a1
7
+ data.tar.gz: 4e69e8fbab7f9d505cd090a4da8802bf27bfdae1c7b3e8a2b3c39777a75cc4a0232c2b751082e6260523bd9216c3eb036407902753b45652b8693b22104e17a9
data/README.md CHANGED
@@ -2,13 +2,19 @@
2
2
 
3
3
  ![](https://raw.githubusercontent.com/wincent/command-t/media/command-t.gif)
4
4
 
5
- Command-T is a Vim plug-in that provides an extremely fast "fuzzy" mechanism for opening files and buffers with a minimal number of keystrokes.
5
+ Command-T is a Vim plug-in that provides an extremely fast "fuzzy" mechanism for:
6
+
7
+ - Opening files and buffers
8
+ - Jumping to tags and help
9
+ - Running commands, or previous searches and commands
10
+
11
+ with a minimal number of keystrokes.
6
12
 
7
13
  Files are selected by typing characters that appear in their paths, and are ranked by an algorithm which knows that characters that appear in certain locations (for example, immediately after a path separator) should be given more weight.
8
14
 
9
15
  Files can be opened in the current window, or in splits or tabs. Many configuration options are provided.
10
16
 
11
- Speed is one of the primary design goals, along with providing high-quality, intuitive match ordering. The hand-crafted matching algorithm, implemented in low-level C and combined with parallelized search, input debouncing, integration with Watchman and many other optimizations, mean that Command-T is the fastest fuzzy file finder bar none.
17
+ Speed is the primary design goal, along with providing high-quality, intuitive match ordering. The hand-crafted matching algorithm, implemented in low-level C and combined with parallelized search, input debouncing, integration with Watchman and many other optimizations, mean that Command-T is the fastest fuzzy file finder bar none.
12
18
 
13
19
  ---
14
20
 
@@ -16,8 +16,9 @@ CONTENTS *command-t-contents*
16
16
  12. Authors |command-t-authors|
17
17
  13. Development |command-t-development|
18
18
  14. Website |command-t-website|
19
- 15. License |command-t-license|
20
- 16. History |command-t-history|
19
+ 15. Related projects |command-t-related-projects|
20
+ 16. License |command-t-license|
21
+ 17. History |command-t-history|
21
22
 
22
23
 
23
24
  INTRODUCTION *command-t-intro*
@@ -161,6 +162,7 @@ Other plug-in managers include:
161
162
  - NeoBundle: https://github.com/Shougo/neobundle.vim (see
162
163
  |command-t-neobundle|)
163
164
  - VAM: https://github.com/MarcWeber/vim-addon-manager (see |command-t-vam|)
165
+ - vim-plug: https://github.com/junegunn/vim-plug (see |command-t-vim-plug|)
164
166
 
165
167
  The following sections outline how to use each of these managers to download
166
168
  Command-T, and finally |command-t-compile| describes how to compile it.
@@ -252,6 +254,7 @@ configuration like this:
252
254
  For more information about NeoBundle, see:
253
255
 
254
256
  https://github.com/Shougo/neobundle.vim
257
+
255
258
  *command-t-vam*
256
259
  Obtaining the source using VAM ~
257
260
 
@@ -268,13 +271,40 @@ For more information about VAM, see:
268
271
 
269
272
  https://github.com/MarcWeber/vim-addon-manager
270
273
 
274
+ *command-t-vim-plug*
275
+ Obtaining the source using vim-plug ~
276
+
277
+ Anywhere between the calls to `plug#begin` and `plug#end` in your
278
+ |.vimrc|, add a `Plug` directive telling vim-plug of your desire to use
279
+ Command-T:
280
+
281
+ call plug#begin()
282
+ Plugin 'wincent/command-t'
283
+ call plug#end()
284
+
285
+ To actually install the plug-in run `:PlugInstall` from inside Vim. After
286
+ this, you can proceed to compile Command-T (see |command-t-compile|) manually,
287
+ or if you wish to have vim-plug attempt to do so automatically, you can use a
288
+ configuration like this:
289
+
290
+ call plug#begin()
291
+ Plug 'wincent/command-t', {
292
+ \ 'do': 'cd ruby/command-t && ruby extconf.rb && make'
293
+ \ }
294
+ call plug#end()
295
+
296
+ For more information about vim-plug, see:
297
+
298
+ https://github.com/junegunn/vim-plug
299
+
271
300
  *command-t-compile*
272
301
  Compiling Command-T ~
273
302
 
274
303
  The C extension must be built, which can be done from the shell. If you use a
275
304
  typical Pathogen, Vundle or NeoBundle set-up then the files were installed inside
276
305
  `~/.vim/bundle/command-t`. A typical VAM installation path might be
277
- `~/.vim/vim-addons/command-t`.
306
+ `~/.vim/vim-addons/command-t`, and vim-plug would be
307
+ `~/.vim/plugged/Command-T/`.
278
308
 
279
309
  Wherever the Command-T files were installed, you can build the extension by
280
310
  changing to the `ruby/command-t` subdirectory and running a couple of commands
@@ -502,58 +532,85 @@ paths which begin with the same prefix.
502
532
  COMMANDS *command-t-commands*
503
533
 
504
534
  *:CommandT*
505
- |:CommandT| Brings up the Command-T file window, starting in the
506
- current working directory as returned by the|:pwd|
507
- command.
508
-
509
- *:CommandTBuffer*
510
- |:CommandTBuffer| Brings up the Command-T buffer window.
511
- This works exactly like the standard file window,
512
- except that the selection is limited to files that
513
- you already have open in buffers.
535
+ |:CommandT| Brings up the Command-T file window, starting in the current
536
+ working directory as returned by the|:pwd|
537
+ command.
538
+
539
+ *:CommandTBuffer*
540
+ |:CommandTBuffer| Brings up the Command-T buffer window.
541
+ This works exactly like the standard file window,
542
+ except that the selection is limited to files that
543
+ you already have open in buffers.
544
+
545
+ *:CommandTCommand*
546
+ |:CommandTCommand| Brings up the Command-T command window. This works
547
+ exactly like the standard file window, except that it shows
548
+ the available commands to run.
549
+
550
+ *:CommandTHelp*
551
+ |:CommandTHelp| Brings up the Command-T help search window. This works
552
+ exactly like the standard file window, except that it shows
553
+ help topics found in any documentation under Vim's
554
+ |'runtimepath'|.
555
+
556
+ *:CommandTHistory*
557
+ |:CommandTHistory| Brings up the Command-T history window. This works
558
+ exactly like the standard file window, except that it shows
559
+ the history of previously entered commands.
560
+
561
+ *:CommandTLine*
562
+ |:CommandTLine| Brings up the Command-T line search window. This works
563
+ exactly like the standard file window, except that it shows
564
+ the lines in the current buffer.
514
565
 
515
566
  *:CommandTMRU*
516
- |:CommandTMRU| Brings up the Command-T buffer window, except that matches
517
- are shown in MRU (most recently used) order. If you prefer to
518
- use this over the normal buffer finder, I suggest overwriting
519
- the standard mapping with a command like:
567
+ |:CommandTMRU| Brings up the Command-T buffer window, except that matches
568
+ are shown in MRU (most recently used) order. If you prefer to
569
+ use this over the normal buffer finder, I suggest overwriting
570
+ the standard mapping with a command like:
520
571
 
521
- :nnoremap <silent> <leader>b :CommandTMRU<CR>
572
+ :nnoremap <silent> <leader>b :CommandTMRU<CR>
522
573
 
523
- Note that Command-T only starts recording most recently used
524
- buffers when you first use a Command-T command or mapping;
525
- this is an optimization to improve startup time.
574
+ Note that Command-T only starts recording most recently used
575
+ buffers when you first use a Command-T command or mapping;
576
+ this is an optimization to improve startup time, which you can
577
+ override by using either |:CommandTLoad| or |commandt#Load|.
526
578
 
527
579
  *:CommandTJumps*
528
- |:CommandTJump| Brings up the Command-T jumplist window.
529
- This works exactly like the standard file window,
530
- except that the selection is limited to files that
531
- you already have in the jumplist. Note that jumps
532
- can persist across Vim sessions (see Vim's |jumplist|
533
- documentation for more info).
580
+ |:CommandTJump| Brings up the Command-T jumplist window.
581
+ This works exactly like the standard file window,
582
+ except that the selection is limited to files that
583
+ you already have in the jumplist. Note that jumps
584
+ can persist across Vim sessions (see Vim's |jumplist|
585
+ documentation for more info).
586
+
587
+ *:CommandTSearch*
588
+ |:CommandTSearch| Brings up the Command-T search window. This works
589
+ exactly like the standard file window, except that it shows
590
+ the history of previously used searches.
534
591
 
535
592
  *:CommandTTag*
536
- |:CommandTTag| Brings up the Command-T window tags window, which can
537
- be used to select from the tags, if any, returned by
538
- Vim's |taglist()| function. See Vim's |tag| documentation
539
- for general info on tags.
593
+ |:CommandTTag| Brings up the Command-T window tags window, which can
594
+ be used to select from the tags, if any, returned by
595
+ Vim's |taglist()| function. See Vim's |tag| documentation
596
+ for general info on tags.
540
597
 
541
598
  *:CommandTFlush*
542
- |:CommandTFlush| Instructs the plug-in to flush its path cache, causing
543
- the directory to be rescanned for new or deleted paths
544
- the next time the file window is shown (pressing <C-f> when
545
- a match listing is visible flushes the cache immediately; this
546
- mapping is configurable via the |g:CommandTRefreshMap|
547
- setting). In addition, all configuration settings are
548
- re-evaluated, causing any changes made to settings via the
549
- |:let| command to be picked up.
599
+ |:CommandTFlush| Instructs the plug-in to flush its path cache, causing
600
+ the directory to be rescanned for new or deleted paths
601
+ the next time the file window is shown (pressing <C-f> when
602
+ a match listing is visible flushes the cache immediately;
603
+ this mapping is configurable via the |g:CommandTRefreshMap|
604
+ setting). In addition, all configuration settings are
605
+ re-evaluated, causing any changes made to settings via the
606
+ |:let| command to be picked up.
550
607
 
551
608
  *:CommandTLoad*
552
- |:CommandTLoad| Immediately loads the plug-in files, if they haven't been
553
- loaded already (normally, the files are loaded lazily the
554
- first time you run a Command-T command or use a Command-T
555
- mapping). This command may be useful for people wishing to
556
- extend Command-T by "monkey patching" its functionality.
609
+ |:CommandTLoad| Immediately loads the plug-in files, if they haven't been
610
+ loaded already (normally, the files are loaded lazily the
611
+ first time you run a Command-T command or use a Command-T
612
+ mapping). This command may be useful for people wishing to
613
+ extend Command-T by "monkey patching" its functionality.
557
614
 
558
615
 
559
616
  MAPPINGS *command-t-mappings*
@@ -590,6 +647,40 @@ binding of Command-T to "New Tab":
590
647
  map <D-t> <Plug>(CommandT)
591
648
  endif
592
649
 
650
+ Additional mappings are available to target, but are not set up by default:
651
+
652
+ *<Plug>(CommandTCommand)*
653
+
654
+ Brings up the Command-T command window.
655
+
656
+ *<Plug>(CommandTHelp)*
657
+
658
+ Brings up the Command-T help search window.
659
+
660
+ *<Plug>(CommandTHistory)*
661
+
662
+ Brings up the Command-T command history search window.
663
+
664
+ *<Plug>(CommandTLine)*
665
+
666
+ Brings up the Command-T line-finder window.
667
+
668
+ *<Plug>(CommandTMRU)*
669
+
670
+ Brings up the Command-T most-recently-used buffer window.
671
+
672
+ *<Plug>(CommandTSearch)*
673
+
674
+ Brings up the Command-T search history window.
675
+
676
+ *<Plug>(CommandTTag)*
677
+
678
+ Brings up the Command-T tag search window.
679
+
680
+ Set up a mapping for any of these like so:
681
+
682
+ nnoremap <silent> <Leader>h <Plug>(CommandTHelp)
683
+
593
684
  When the Command-T window is active a number of other additional mappings
594
685
  become available for doing things like moving between and selecting matches.
595
686
  These are fully described above in the USAGE section, and settings for
@@ -609,23 +700,29 @@ changes via |:let|.
609
700
 
610
701
  Following is a list of all available options:
611
702
 
612
- *g:CommandTMaxFiles*
613
- |g:CommandTMaxFiles| number (default 30000)
703
+ *g:CommandTMaxFiles*
704
+ |g:CommandTMaxFiles| number (default 100000)
614
705
 
615
706
  The maximum number of files that will be considered when scanning the
616
707
  current directory. Upon reaching this number scanning stops. This
617
708
  limit applies only to file listings and is ignored for buffer
618
709
  listings.
619
710
 
620
- *g:CommandTMaxDepth*
621
- |g:CommandTMaxDepth| number (default 15)
711
+ *g:CommandTSuppressMaxFilesWarning*
712
+ |g:CommandTSuppressMaxFilesWarning| boolean (default 0)
713
+
714
+ Suppress the warning that Command-T shows when hitting the
715
+ |g:CommandTMaxFiles| limit during a scan.
716
+
717
+ *g:CommandTMaxDepth*
718
+ |g:CommandTMaxDepth| number (default 15)
622
719
 
623
720
  The maximum depth (levels of recursion) to be explored when scanning the
624
721
  current directory. Any directories at levels beyond this depth will be
625
722
  skipped.
626
723
 
627
- *g:CommandTMaxCachedDirectories*
628
- |g:CommandTMaxCachedDirectories| number (default 1)
724
+ *g:CommandTMaxCachedDirectories*
725
+ |g:CommandTMaxCachedDirectories| number (default 1)
629
726
 
630
727
  The maximum number of directories whose contents should be cached when
631
728
  recursively scanning. With the default value of 1, each time you change
@@ -634,23 +731,23 @@ Following is a list of all available options:
634
731
  cache, bringing performance at the cost of memory usage. If set to 0,
635
732
  there is no limit on the number of cached directories.
636
733
 
637
- *g:CommandTMaxHeight*
638
- |g:CommandTMaxHeight| number (default: 15)
734
+ *g:CommandTMaxHeight*
735
+ |g:CommandTMaxHeight| number (default: 15)
639
736
 
640
737
  The maximum height in lines the match window is allowed to expand to.
641
738
  If set to 0, the window will occupy as much of the available space as
642
739
  needed to show matching entries.
643
740
 
644
- *g:CommandTInputDebounce*
645
- |g:CommandTInputDebounce| number (default: 50)
741
+ *g:CommandTInputDebounce*
742
+ |g:CommandTInputDebounce| number (default: 0)
646
743
 
647
744
  The number of milliseconds to wait before updating the match listing
648
745
  following a key-press. This can be used to avoid wasteful recomputation
649
746
  when making a rapid series of key-presses in a directory with many tens
650
747
  (or hundreds) of thousands of files.
651
748
 
652
- *g:CommandTFileScanner*
653
- |g:CommandTFileScanner| string (default: 'ruby')
749
+ *g:CommandTFileScanner*
750
+ |g:CommandTFileScanner| string (default: 'ruby')
654
751
 
655
752
  The underlying scanner implementation that should be used to explore the
656
753
  filesystem. Possible values are:
@@ -672,11 +769,11 @@ Following is a list of all available options:
672
769
  intended for use with very large hierarchies (hundreds of thousands of
673
770
  files) and so the task of deciding which files should be included is
674
771
  entirely delegated to Watchman; this means that settings which
675
- Command-T would usually consult, such as 'wildignore' and
772
+ Command-T would usually consult, such as
676
773
  |g:CommandTScanDotDirectories| are ignored.
677
774
 
678
- *g:CommandTTraverseSCM*
679
- |g:CommandTTraverseSCM| string (default: 'file')
775
+ *g:CommandTTraverseSCM*
776
+ |g:CommandTTraverseSCM| string (default: 'file')
680
777
 
681
778
  Instructs Command-T how to choose a root path when opening a file finder
682
779
  without an explicit path argument. Possible values are:
@@ -696,29 +793,29 @@ Following is a list of all available options:
696
793
  - "pwd": use Vim's present working directory as a root (ie. attempt no
697
794
  traversal).
698
795
 
699
- *g:CommandTGitScanSubmodules*
700
- |g:CommandTGitScanSubmodules| boolean (default: 0)
796
+ *g:CommandTGitScanSubmodules*
797
+ |g:CommandTGitScanSubmodules| boolean (default: 0)
701
798
 
702
799
  If set to 1, Command-T will scan submodules (recursively) when using the
703
800
  "git" file scanner (see |g:CommandTFileScanner|).
704
801
 
705
802
 
706
- *g:CommandTSCMDirectories*
803
+ *g:CommandTSCMDirectories*
707
804
  |g:CommandTSCMDirectories| string (default: '.git,.hg,.svn,.bzr,_darcs')
708
805
 
709
806
  The marker directories that Command-T will use to identify SCM roots
710
807
  during traversal (see |g:CommandTTraverseSCM| above).
711
808
 
712
809
 
713
- *g:CommandTMinHeight*
714
- |g:CommandTMinHeight| number (default: 0)
810
+ *g:CommandTMinHeight*
811
+ |g:CommandTMinHeight| number (default: 0)
715
812
 
716
813
  The minimum height in lines the match window is allowed to shrink to.
717
814
  If set to 0, will default to a single line. If set above the max height,
718
815
  will default to |g:CommandTMaxHeight|.
719
816
 
720
- *g:CommandTAlwaysShowDotFiles*
721
- |g:CommandTAlwaysShowDotFiles| boolean (default: 0)
817
+ *g:CommandTAlwaysShowDotFiles*
818
+ |g:CommandTAlwaysShowDotFiles| boolean (default: 0)
722
819
 
723
820
  When showing the file listing Command-T will by default show dot-files
724
821
  only if the entered search string contains a dot that could cause a
@@ -729,8 +826,8 @@ Following is a list of all available options:
729
826
  the file listing; the buffer listing treats dot-files like any other
730
827
  file.
731
828
 
732
- *g:CommandTNeverShowDotFiles*
733
- |g:CommandTNeverShowDotFiles| boolean (default: 0)
829
+ *g:CommandTNeverShowDotFiles*
830
+ |g:CommandTNeverShowDotFiles| boolean (default: 0)
734
831
 
735
832
  In the file listing, Command-T will by default show dot-files if the
736
833
  entered search string contains a dot that could cause a dot-file to
@@ -742,8 +839,8 @@ Following is a list of all available options:
742
839
  has no effect in buffer listings, where dot files are treated like any
743
840
  other file.
744
841
 
745
- *g:CommandTScanDotDirectories*
746
- |g:CommandTScanDotDirectories| boolean (default: 0)
842
+ *g:CommandTScanDotDirectories*
843
+ |g:CommandTScanDotDirectories| boolean (default: 0)
747
844
 
748
845
  Normally Command-T will not recurse into "dot-directories" (directories
749
846
  whose names begin with a dot) while performing its initial scan. Set
@@ -761,8 +858,8 @@ Following is a list of all available options:
761
858
  :cd ~/.vim
762
859
  :CommandT
763
860
 
764
- *g:CommandTMatchWindowAtTop*
765
- |g:CommandTMatchWindowAtTop| boolean (default: 0)
861
+ *g:CommandTMatchWindowAtTop*
862
+ |g:CommandTMatchWindowAtTop| boolean (default: 0)
766
863
 
767
864
  When this setting is off (the default) the match window will appear at
768
865
  the bottom so as to keep it near to the prompt. Turning it on causes the
@@ -772,8 +869,8 @@ Following is a list of all available options:
772
869
  screen rather than moving as the number of matches changes during
773
870
  typing.
774
871
 
775
- *g:CommandTMatchWindowReverse*
776
- |g:CommandTMatchWindowReverse| boolean (default: 1)
872
+ *g:CommandTMatchWindowReverse*
873
+ |g:CommandTMatchWindowReverse| boolean (default: 1)
777
874
 
778
875
  When this setting is on (the default), matches will be shown in reverse
779
876
  order, with the best match at the bottom (ie. closest to the prompt).
@@ -782,60 +879,64 @@ Following is a list of all available options:
782
879
  the screen (independently of the number of results). When set to 0,
783
880
  matches will appear from top to bottom with the topmost being selected.
784
881
 
785
- *g:CommandTTagIncludeFilenames*
786
- |g:CommandTTagIncludeFilenames| boolean (default: 0)
882
+ *g:CommandTTagIncludeFilenames*
883
+ |g:CommandTTagIncludeFilenames| boolean (default: 0)
787
884
 
788
885
  When this setting is off (the default) the matches in the |:CommandTTag|
789
886
  listing do not include filenames.
790
887
 
791
- *g:CommandTCursorColor*
792
- string (default: 'Underlined')
888
+ *g:CommandTCursorColor*
889
+ string (default: 'Underlined')
793
890
  |g:CommandTCursorColor|
794
891
 
795
892
  Specifies the |:highlight| color that will be applied to the cursor in
796
893
  the Command-T prompt.
797
894
 
798
- *g:CommandTHighlightColor*
799
- |g:CommandTHighlightColor| string (default: 'PmenuSel')
895
+ *g:CommandTHighlightColor*
896
+ |g:CommandTHighlightColor| string (default: 'PmenuSel')
800
897
 
801
898
  Specifies the |:highlight| color that will be used to show the currently
802
899
  selected item in the match listing window.
803
900
 
804
- *g:CommandTWildIgnore*
805
- |g:CommandTWildIgnore| string (default: none)
901
+ *g:CommandTWildIgnore*
902
+ |g:CommandTWildIgnore| string (default: none)
806
903
 
807
904
  Optionally override Vim's global |'wildignore'| setting during Command-T
808
905
  searches. If you wish to supplement rather than replace the global
809
906
  setting, you can use a syntax like:
810
907
 
811
- let g:CommandTWildIgnore=&wildignore . ",**/bower_components/*"
908
+ let g:CommandTWildIgnore=&wildignore . ",*/bower_components"
909
+
910
+ To disable all |'wildignore'|-based filtering, set to an empty string:
911
+
912
+ let g:CommandTWildIgnore=''
812
913
 
813
914
  See also |command-t-wildignore|.
814
915
 
815
- *g:CommandTIgnoreCase*
816
- |g:CommandTIgnoreCase| boolean (default: 1)
916
+ *g:CommandTIgnoreCase*
917
+ |g:CommandTIgnoreCase| boolean (default: 1)
817
918
 
818
919
  Ignore case when searching. Defaults to on, which means that searching
819
920
  is case-insensitive by default. See also |g:CommandTSmartCase|.
820
921
 
821
- *g:CommandTRecursiveMatch*
822
- |g:CommandTRecursiveMatch| boolean (default: 1)
922
+ *g:CommandTRecursiveMatch*
923
+ |g:CommandTRecursiveMatch| boolean (default: 1)
823
924
 
824
925
  Use this to downgrade Command-T's match-scoring algorithm to its older,
825
- non-recursive form. Doing so may improve the responsiveness of the match
826
- listing, but at the cost of slightly less precision in the ranking of
827
- results.
926
+ cruder, less expensive form. Doing so may improve the responsiveness of
927
+ the match listing, but at the cost of slightly less precision in the
928
+ ranking of results.
828
929
 
829
- *g:CommandTSmartCase*
830
- |g:CommandTSmartCase| boolean (default: none)
930
+ *g:CommandTSmartCase*
931
+ |g:CommandTSmartCase| boolean (default: none)
831
932
 
832
933
  Override the |g:CommandTIgnoreCase| setting if the search pattern
833
934
  contains uppercase characters, forcing the match to be case-sensitive.
834
935
  If unset (which is the default), the value of the Vim |'smartcase'|
835
936
  setting will be used instead.
836
937
 
837
- *g:CommandTAcceptSelectionCommand*
838
- |g:CommandTAcceptSelectionCommand| string (default: 'e')
938
+ *g:CommandTAcceptSelectionCommand*
939
+ |g:CommandTAcceptSelectionCommand| string (default: 'e')
839
940
 
840
941
  The Vim command that will be used to open a selection from the match
841
942
  listing (via |g:CommandTAcceptSelectionMap|).
@@ -890,8 +991,8 @@ Following is a list of all available options:
890
991
  For an example of how this can be used to apply arbitrarily complex
891
992
  logic, see the example in |g:CommandTAcceptSelectionTabCommand| above.
892
993
 
893
- *g:CommandTEncoding*
894
- |g:CommandTEncoding| string (default: none)
994
+ *g:CommandTEncoding*
995
+ |g:CommandTEncoding| string (default: none)
895
996
 
896
997
  In most environments Command-T will work just fine using the character
897
998
  encoding settings from your local environment. This setting can be used
@@ -899,8 +1000,8 @@ Following is a list of all available options:
899
1000
  environment ends up defaulting to an undesired encoding, such as
900
1001
  "ASCII-8BIT".
901
1002
 
902
- *g:CommandTIgnoreSpaces*
903
- |g:CommandTIgnoreSpaces| boolean (default: 1)
1003
+ *g:CommandTIgnoreSpaces*
1004
+ |g:CommandTIgnoreSpaces| boolean (default: 1)
904
1005
 
905
1006
  When typing a search term into Command-T, ignore spaces. When set to 0,
906
1007
  Command-T will search for literal spaces inside file names.
@@ -991,16 +1092,34 @@ settings can be used to control behavior:
991
1092
  Vim's |'wildignore'| setting is used to determine which files should be
992
1093
  excluded from listings. This is a comma-separated list of glob patterns.
993
1094
  It defaults to the empty string, but common settings include "*.o,*.obj"
994
- (to exclude object files) or "**/.git/*,**/.svn/*" (to exclude SCM
1095
+ (to exclude object files) or "*/.git,*/.svn" (to exclude SCM
995
1096
  metadata directories). For example:
996
1097
 
997
1098
  :set wildignore+=*.o,*.obj
998
1099
 
999
- A pattern such as "vendor/rails/**" would exclude all files and
1000
- subdirectories inside the "vendor/rails" directory (relative to
1001
- directory Command-T starts in).
1100
+ A pattern such as "*/vendor/rails" would exclude all files and
1101
+ subdirectories inside the "vendor/rails" directory.
1002
1102
 
1003
- See the |'wildignore'| documentation for more information.
1103
+ See the |'wildignore'| documentation for more information. Here is an
1104
+ overview of how different common patterns affect Vim and Command-T
1105
+ behavior:
1106
+
1107
+ wildignore File File Dir Dir Dir + File
1108
+ Pattern "foo" "a/foo" "foo" "a/foo" "a/foo/b"
1109
+ ---------------------------------------------------------------
1110
+ `foo` match match miss miss miss
1111
+ `foo/` miss miss miss miss miss
1112
+ `foo/*` miss miss miss miss miss
1113
+ `*/foo` match match match match match
1114
+ `*/foo/` miss miss match miss miss
1115
+ `*/foo/*` miss miss match match match
1116
+
1117
+ In short, in general you want to use patterns like:
1118
+
1119
+ - `foo`: to match a file at any level.
1120
+ - `*.foo`: to match a file with an extension at any level.
1121
+ - `*/foo`: to match a file or directory at any level.
1122
+ - `*/foo/*`: to match a directory at any level.
1004
1123
 
1005
1124
  If you want to influence Command-T's file exclusion behavior without
1006
1125
  changing your global |'wildignore'| setting, you can use the
@@ -1013,23 +1132,18 @@ settings can be used to control behavior:
1013
1132
  - The default "ruby" scanner explores the filesystem recursively using a
1014
1133
  depth-first search, and any directory (or subdirectory) which matches
1015
1134
  the 'wildignore' pattern is not explored. So, if your 'wildignore'
1016
- contains "node_modules" then that entire sub-hierarchy will be
1017
- ignored. Additionally, wildcard patterns like "node_modules/**" or
1018
- "**/node_modules/*" will cause the entire sub-hierarchy to be ignored.
1135
+ contains "*/node_modules" then that entire sub-hierarchy will be
1136
+ ignored.
1019
1137
 
1020
1138
  - The "git" and "find" scanners apply 'wildignore' filtering only after
1021
- completing their scans. Filtering only applies to files and not
1022
- directories. This means that in the "node_modules" example case, the
1023
- "node_modules" directory is not considered itself, and when we examine
1024
- a file like "node_modules/foo/bar" the "node_modules" pattern does
1025
- not match it (because "bar" does not match it). To exclude
1026
- any "node_modules" directory anywhere in the hierarchy and all of its
1027
- descendants we must use a pattern like "**/node_modules/*". To do this
1028
- only for a top-level "node_modules", use "node_modules/**".
1139
+ completing their scans.
1029
1140
 
1030
1141
  - The "watchman" scanner is intended for use with massive hierarchies
1031
- where speed is of the utmost import, so it doesn't consult
1032
- 'wildignore' at all.
1142
+ where speed is of the utmost import, so it doesn't make use of Vim's
1143
+ very slow 'wildignore' filtering at all. Instead, it constructs a
1144
+ regular expression on the fly based on 'wildignore' and/or
1145
+ |g:CommandTWildIgnore| and uses that. To suppress this behavior, set
1146
+ |g:CommandTWildIgnore| to an empty string.
1033
1147
 
1034
1148
 
1035
1149
  INTEGRATION AND EXTENSIBILITY *command-t-integration-and-extensibility*
@@ -1134,7 +1248,7 @@ your terminal has frozen, but it hasn't.
1134
1248
  To disable flow control, add the following to your `.zshrc` or
1135
1249
  `.bash_profile`:
1136
1250
 
1137
- stty -ixon
1251
+ stty -ixon -ixoff
1138
1252
 
1139
1253
  See the `stty` man page for more details.
1140
1254
 
@@ -1188,9 +1302,9 @@ reasonable compromise.
1188
1302
  The default limit of 30,000 files prevents Command-T from "seeing" many of the
1189
1303
  files in a large directory hierarchy so you need to increase this limit.
1190
1304
 
1191
- let g:CommandTInputDebounce = 200
1305
+ let g:CommandTInputDebounce = 50
1192
1306
 
1193
- Wait for 200ms of keyboard inactivity before computing search results. For
1307
+ Wait for 50ms of keyboard inactivity before computing search results. For
1194
1308
  example, if you are enter "foobar" quickly (ie. within 1 second), there is
1195
1309
  little sense in fetching the results for "f", "fo", "foo", "foob", "fooba" and
1196
1310
  finally "foobar". Instead, we can just fetch the results for "foobar". This
@@ -1240,11 +1354,12 @@ listing with fewer keystrokes. See also |g:CommandTIgnoreCase|.
1240
1354
 
1241
1355
  let g:CommandTRecursiveMatch = 0
1242
1356
 
1243
- This one is a little more subjective. You may want to turn off Command-T's
1244
- recursive match-scoring algorithm to save some cycles. This finds matches more
1245
- quickly at the possible cost of ranking them slightly less precisely. Whether
1246
- applying this setting helps or hurts you in a very large repo is probably
1247
- repo-dependent.
1357
+ This one is a little more subjective. You may want to downgrade Command-T's
1358
+ match-scoring algorithm to a cheaper but less precise method to save some
1359
+ cycles. This finds matches more quickly at the possible cost of ranking them
1360
+ slightly less precisely. Whether applying this setting helps or hurts you in a
1361
+ very large repo is probably repo-dependent. For reference, I do not use this
1362
+ setting, even in repos of over 500,000 files.
1248
1363
 
1249
1364
  As noted in the introduction, Command-T works best when you adopt a
1250
1365
  "path-centric" mentality. This is especially true on very large hierarchies.
@@ -1269,20 +1384,21 @@ kind of ongoing calibration will come quite naturally.
1269
1384
  Finally, it is important to be on a relatively recent version of Command-T to
1270
1385
  fully benefit from the available performance enhancements:
1271
1386
 
1272
- - version 2.0 (December 2015) added the |g:CommandTRecursiveMatch| option
1273
- - version 1.10 (July 2014) added the |g:CommandTIgnoreCase| and
1274
- |g:CommandTSmartCase| options
1275
- - version 1.9 (May 2014) tweaked memoization algorithm for a 10% speed boost
1276
- - version 1.8 (March 2014) sped up the Watchman file scanner by switching its
1277
- communication from the JSON to the binary Watchman protocol
1278
- - version 1.7 (February 2014) added the |g:CommandTInputDebounce| and
1387
+ - Version 3.1 (March 2016) sped up the matching algorithm by 17x.
1388
+ - Version 2.0 (December 2015) added the |g:CommandTRecursiveMatch| option.
1389
+ - Version 1.10 (July 2014) added the |g:CommandTIgnoreCase| and
1390
+ |g:CommandTSmartCase| options.
1391
+ - Version 1.9 (May 2014) tweaked memoization algorithm for a 10% speed boost.
1392
+ - Version 1.8 (March 2014) sped up the Watchman file scanner by switching its
1393
+ communication from the JSON to the binary Watchman protocol.
1394
+ - Version 1.7 (February 2014) added the |g:CommandTInputDebounce| and
1279
1395
  |g:CommandTFileScanner| settings, along with support for the Watchman file
1280
- scanner
1281
- - version 1.6 (December 2013) added parallelized search
1282
- - version 1.5 (September 2013) added memoization to the matching algorithm,
1396
+ scanner.
1397
+ - Version 1.6 (December 2013) added parallelized search.
1398
+ - Version 1.5 (September 2013) added memoization to the matching algorithm,
1283
1399
  improving general performance on large hierarchies, but delivering
1284
1400
  spectacular gains on hierarchies with "pathological" characteristics that
1285
- lead the algorithm to exhibit degenerate behavior
1401
+ lead the algorithm to exhibit degenerate behavior.
1286
1402
 
1287
1403
  AUTHORS *command-t-authors*
1288
1404
 
@@ -1290,18 +1406,19 @@ Command-T is written and maintained by Greg Hurrell <greg@hurrell.net>.
1290
1406
  Other contributors that have submitted patches include (in alphabetical
1291
1407
  order, via `git shortlog -s | cut -f 2-3 | column -c 72`):
1292
1408
 
1293
- Abhinav Gupta Nicholas T.
1294
- Aleksandrs Ļedovskis Nicolas Alpi
1295
- Andy Waite Nikolai Aleksandrovich Pavlov
1409
+ Abhinav Gupta Nicolas Alpi
1410
+ Aleksandrs Ļedovskis Nikolai Aleksandrovich Pavlov
1411
+ Andy Waite Nilo César Teixeira
1296
1412
  Anthony Panozzo Noon Silk
1297
1413
  Artem Nezvigin Ole Petter Bang
1298
1414
  Ben Boeckel Patrick Hayes
1299
- Daniel Hahler Paul Jolly
1300
- David Szotten Pavel Sergeev
1301
- Emily Strickland Rainux Luo
1302
- Felix Tjandrawibawa Richard Feldman
1303
- Gary Bernhardt Roland Puntaier
1304
- Greg Hurrell Ross Lagerwall
1415
+ Daniel Burgess Paul Jolly
1416
+ Daniel Hahler Pavel Sergeev
1417
+ David Szotten Rainux Luo
1418
+ Emily Strickland Richard Feldman
1419
+ Felix Tjandrawibawa Roland Puntaier
1420
+ Gary Bernhardt Ross Lagerwall
1421
+ Greg Hurrell Sam Morris
1305
1422
  Ivan Ukhov Scott Bronson
1306
1423
  Jeff Kreeftmeijer Seth Fowler
1307
1424
  Jerome Castaneda Sherzod Gapirov
@@ -1316,10 +1433,11 @@ order, via `git shortlog -s | cut -f 2-3 | column -c 72`):
1316
1433
  Mike Lundy Woody Peterson
1317
1434
  Nadav Samet Yan Pritzker
1318
1435
  Nate Kane Zak Johnson
1436
+ Nicholas T.
1319
1437
 
1320
- Additionally, Jacek Wysocki and Yiding Jia wrote patches which were not
1321
- directly included but which served as a model for changes that did end up
1322
- making it in.
1438
+ Additionally, Hanson Wang, Jacek Wysocki and Yiding Jia wrote patches which
1439
+ were not directly included but which served as a model for changes that did
1440
+ end up making it in.
1323
1441
 
1324
1442
  As this was the first Vim plug-in I had ever written I was heavily influenced
1325
1443
  by the design of the LustyExplorer plug-in by Stephen Bach, which I understand
@@ -1387,6 +1505,23 @@ Bug reports should be submitted to the issue tracker at:
1387
1505
  https://github.com/wincent/command-t/issues
1388
1506
 
1389
1507
 
1508
+ RELATED PROJECTS *command-t-related-projects*
1509
+
1510
+ fuzzy-native ~
1511
+
1512
+ Command-T's matching algorithm ported to C++ and wrapped inside a Node NPM
1513
+ module:
1514
+
1515
+ https://github.com/hansonw/fuzzy-native
1516
+
1517
+ ctrlp-cmatcher ~
1518
+
1519
+ Command-T's matching algorithm wrapped in a Python extension, for use with
1520
+ the CtrlP Vim plug-in:
1521
+
1522
+ https://github.com/JazzCore/ctrlp-cmatcher
1523
+
1524
+
1390
1525
  LICENSE *command-t-license*
1391
1526
 
1392
1527
  Copyright 2010-present Greg Hurrell. All rights reserved.
@@ -1414,7 +1549,37 @@ POSSIBILITY OF SUCH DAMAGE.
1414
1549
 
1415
1550
  HISTORY *command-t-history*
1416
1551
 
1417
- 3.1 (not yet released)
1552
+ 4.0 (16 May 2016)
1553
+
1554
+ - A non-leading dot in the search query can now match against dot-files and
1555
+ "dot-directories" in non-leading path components.
1556
+ - Matching algorithm sped up by about 17x (with help from Hanson Wang).
1557
+ - |g:CommandTInputDebounce| now defaults to 0, as the recent optimizations
1558
+ make debouncing largely unnecessary.
1559
+ - Added |:CommandTHelp| for jumping to locations in the help, and an
1560
+ accompanying mapping, |<Plug>(CommandTHelp)|.
1561
+ - Added |:CommandTLine| for jumping to lines within the current buffer, and a
1562
+ corresponding mapping, |<Plug>(CommandTLine)|.
1563
+ - Added |:CommandTHistory| for jumping to previously entered commands, and a
1564
+ corresponding mapping, |<Plug>(CommandTHistory)|.
1565
+ - Added |:CommandTSearch| for jumping to previously entered searches, and a
1566
+ corresponding mapping, |<Plug>(CommandTSearch)|.
1567
+ - Added |:CommandTCommand| for finding commands, and a corresponding mapping,
1568
+ |<Plug>(CommandTCommand)|.
1569
+ - Added |<Plug>(CommandTMRU)| and |<Plug>(CommandTTag)| mappings.
1570
+ - The "ruby" and "find" scanners now show numerical progress in the prompt
1571
+ area during their scans.
1572
+ - Removed functionality that was previously deprecated in 2.0.
1573
+ - Fix inability to type "^" and "|" at the prompt.
1574
+ - Make it possible to completely disable |'wildignore'|-based filtering by
1575
+ setting |g:CommandTWildIgnore| to an empty string.
1576
+ - The "watchman" file scanner now respects |'wildignore'| and
1577
+ |g:CommandTWildIgnore| by construcing an equivalent regular expression and
1578
+ using that for filtering.
1579
+ - Show a warning when hitting |g:CommandTMaxFiles|, and add a corresponding
1580
+ |g:CommandTSuppressMaxFilesWarning| setting to suppress the warning.
1581
+
1582
+ 3.0.2 (9 February 2016)
1418
1583
 
1419
1584
  - Minimize flicker on opening and closing the match listing in MacVim.
1420
1585
  - Add |CommandTWillShowMatchListing| and |CommandTDidHideMatchListing| "User"