command-t 3.0.2 → 4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/doc/command-t.txt +312 -147
- data/ruby/command-t.rb +13 -12
- data/ruby/command-t/controller.rb +86 -15
- data/ruby/command-t/depend +4 -0
- data/ruby/command-t/ext.h +9 -2
- data/ruby/command-t/extconf.rb +2 -2
- data/ruby/command-t/finder.rb +6 -2
- data/ruby/command-t/finder/buffer_finder.rb +3 -3
- data/ruby/command-t/finder/command_finder.rb +23 -0
- data/ruby/command-t/finder/file_finder.rb +3 -3
- data/ruby/command-t/finder/help_finder.rb +25 -0
- data/ruby/command-t/finder/history_finder.rb +27 -0
- data/ruby/command-t/finder/jump_finder.rb +3 -3
- data/ruby/command-t/finder/line_finder.rb +23 -0
- data/ruby/command-t/finder/mru_buffer_finder.rb +3 -3
- data/ruby/command-t/finder/tag_finder.rb +3 -3
- data/ruby/command-t/heap.c +146 -0
- data/ruby/command-t/heap.h +22 -0
- data/ruby/command-t/match.c +183 -116
- data/ruby/command-t/match.h +16 -10
- data/ruby/command-t/match_window.rb +10 -1
- data/ruby/command-t/matcher.c +203 -63
- data/ruby/command-t/metadata/fallback.rb +2 -2
- data/ruby/command-t/mru.rb +2 -2
- data/ruby/command-t/path_utilities.rb +2 -2
- data/ruby/command-t/progress_reporter.rb +38 -0
- data/ruby/command-t/prompt.rb +4 -4
- data/ruby/command-t/scanner.rb +22 -2
- data/ruby/command-t/scanner/buffer_scanner.rb +3 -3
- data/ruby/command-t/scanner/command_scanner.rb +33 -0
- data/ruby/command-t/scanner/file_scanner.rb +30 -6
- data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +12 -7
- data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +11 -8
- data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +7 -4
- data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +13 -5
- data/ruby/command-t/scanner/help_scanner.rb +40 -0
- data/ruby/command-t/scanner/history_scanner.rb +24 -0
- data/ruby/command-t/scanner/jump_scanner.rb +3 -3
- data/ruby/command-t/scanner/line_scanner.rb +45 -0
- data/ruby/command-t/scanner/mru_buffer_scanner.rb +3 -3
- data/ruby/command-t/scanner/tag_scanner.rb +3 -3
- data/ruby/command-t/scm_utilities.rb +2 -2
- data/ruby/command-t/settings.rb +2 -2
- data/ruby/command-t/stub.rb +7 -2
- data/ruby/command-t/util.rb +2 -2
- data/ruby/command-t/vim.rb +27 -2
- data/ruby/command-t/vim/screen.rb +3 -3
- data/ruby/command-t/vim/window.rb +3 -3
- data/ruby/command-t/watchman.c +1 -1
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe0c88c55ccf81debb55313b6cd621a154fd4d4c
|
4
|
+
data.tar.gz: 326424cad8c6cb0270afaf7e66ce40de656a84be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
|
data/doc/command-t.txt
CHANGED
@@ -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.
|
20
|
-
16.
|
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|
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|:CommandTBuffer|
|
511
|
-
|
512
|
-
|
513
|
-
|
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|
|
517
|
-
|
518
|
-
|
519
|
-
|
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
|
-
|
572
|
+
:nnoremap <silent> <leader>b :CommandTMRU<CR>
|
522
573
|
|
523
|
-
|
524
|
-
|
525
|
-
|
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|
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
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|
|
537
|
-
|
538
|
-
|
539
|
-
|
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|
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
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|
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
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
|
-
|
613
|
-
|g:CommandTMaxFiles|
|
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
|
-
|
621
|
-
|g:
|
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
|
-
|
628
|
-
|g:CommandTMaxCachedDirectories|
|
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
|
-
|
638
|
-
|g:CommandTMaxHeight|
|
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
|
-
|
645
|
-
|g:CommandTInputDebounce|
|
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
|
-
|
653
|
-
|g:CommandTFileScanner|
|
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
|
772
|
+
Command-T would usually consult, such as
|
676
773
|
|g:CommandTScanDotDirectories| are ignored.
|
677
774
|
|
678
|
-
|
679
|
-
|g:CommandTTraverseSCM|
|
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
|
-
|
700
|
-
|g:CommandTGitScanSubmodules|
|
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
|
-
|
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
|
-
|
714
|
-
|g:CommandTMinHeight|
|
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
|
-
|
721
|
-
|g:CommandTAlwaysShowDotFiles|
|
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
|
-
|
733
|
-
|g:CommandTNeverShowDotFiles|
|
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
|
-
|
746
|
-
|g:CommandTScanDotDirectories|
|
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
|
-
|
765
|
-
|g:CommandTMatchWindowAtTop|
|
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
|
-
|
776
|
-
|g:CommandTMatchWindowReverse|
|
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
|
-
|
786
|
-
|g:CommandTTagIncludeFilenames|
|
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
|
-
|
792
|
-
|
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
|
-
|
799
|
-
|g:CommandTHighlightColor|
|
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
|
-
|
805
|
-
|g:CommandTWildIgnore|
|
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 . "
|
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
|
-
|
816
|
-
|g:CommandTIgnoreCase|
|
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
|
-
|
822
|
-
|g:CommandTRecursiveMatch|
|
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
|
-
|
826
|
-
listing, but at the cost of slightly less precision in the
|
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
|
-
|
830
|
-
|g:CommandTSmartCase|
|
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
|
-
|
838
|
-
|g:CommandTAcceptSelectionCommand|
|
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
|
-
|
894
|
-
|g:CommandTEncoding|
|
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
|
-
|
903
|
-
|g:CommandTIgnoreSpaces|
|
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 "
|
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
|
1000
|
-
subdirectories inside the "vendor/rails" directory
|
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.
|
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.
|
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
|
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 =
|
1305
|
+
let g:CommandTInputDebounce = 50
|
1192
1306
|
|
1193
|
-
Wait 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
|
1244
|
-
|
1245
|
-
quickly at the possible cost of ranking them
|
1246
|
-
applying this setting helps or hurts you in a
|
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
|
-
-
|
1273
|
-
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
-
|
1277
|
-
|
1278
|
-
|
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
|
-
-
|
1282
|
-
-
|
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
|
1294
|
-
Aleksandrs Ļedovskis
|
1295
|
-
Andy Waite
|
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
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
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
|
1321
|
-
directly included but which served as a model for changes that did
|
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
|
-
|
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"
|