command-t 1.2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +7 -0
- data/Rakefile +2 -0
- data/doc/command-t.txt +120 -70
- data/ruby/command-t/ext.bundle +0 -0
- data/ruby/command-t/match_window.rb +10 -0
- metadata +5 -4
- data/doc/README.txt +0 -779
data/README.txt
CHANGED
@@ -650,6 +650,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
650
650
|
|
651
651
|
HISTORY *command-t-history*
|
652
652
|
|
653
|
+
1.2.1 (30 April 2011)
|
654
|
+
|
655
|
+
- Remove duplicate copy of the documentation that was causing "Duplicate tag"
|
656
|
+
errors
|
657
|
+
- Mitigate issue with distracting blinking cursor in non-GUI versions of Vim
|
658
|
+
(patch from Steven Moazami)
|
659
|
+
|
653
660
|
1.2 (30 April 2011)
|
654
661
|
|
655
662
|
- added |g:CommandTMatchWindowReverse| option, to reverse the order of items
|
data/Rakefile
CHANGED
data/doc/command-t.txt
CHANGED
@@ -21,9 +21,9 @@ CONTENTS *command-t-contents*
|
|
21
21
|
INTRODUCTION *command-t-intro*
|
22
22
|
|
23
23
|
The Command-T plug-in provides an extremely fast, intuitive mechanism for
|
24
|
-
opening files with a minimal number of keystrokes. It's named
|
25
|
-
because it is inspired by the "Go to File" window bound to
|
26
|
-
TextMate.
|
24
|
+
opening files and buffers with a minimal number of keystrokes. It's named
|
25
|
+
"Command-T" because it is inspired by the "Go to File" window bound to
|
26
|
+
Command-T in TextMate.
|
27
27
|
|
28
28
|
Files are selected by typing characters that appear in their paths, and are
|
29
29
|
ordered by an algorithm which knows that characters that appear in certain
|
@@ -240,17 +240,17 @@ you eliminate the discrepancy.
|
|
240
240
|
|
241
241
|
USAGE *command-t-usage*
|
242
242
|
|
243
|
-
Bring up the Command-T
|
243
|
+
Bring up the Command-T file window by typing:
|
244
244
|
|
245
245
|
<Leader>t
|
246
246
|
|
247
247
|
This mapping is set up automatically for you, provided you do not already have
|
248
|
-
a mapping for <Leader>t or |:CommandT|. You can also bring up the
|
248
|
+
a mapping for <Leader>t or |:CommandT|. You can also bring up the file window
|
249
249
|
by issuing the command:
|
250
250
|
|
251
251
|
:CommandT
|
252
252
|
|
253
|
-
A prompt will appear at the bottom of the screen along with a
|
253
|
+
A prompt will appear at the bottom of the screen along with a file window
|
254
254
|
showing all of the files in the current directory (as returned by the
|
255
255
|
|:pwd| command).
|
256
256
|
|
@@ -284,13 +284,13 @@ The following mappings are active when the prompt has focus:
|
|
284
284
|
<C-a> move the cursor to the start (left)
|
285
285
|
<C-e> move the cursor to the end (right)
|
286
286
|
<C-u> clear the contents of the prompt
|
287
|
-
<Tab> change focus to the
|
287
|
+
<Tab> change focus to the file listing
|
288
288
|
|
289
|
-
The following mappings are active when the
|
289
|
+
The following mappings are active when the file listing has focus:
|
290
290
|
|
291
291
|
<Tab> change focus to the prompt
|
292
292
|
|
293
|
-
The following mappings are active when either the prompt or the
|
293
|
+
The following mappings are active when either the prompt or the file listing
|
294
294
|
has focus:
|
295
295
|
|
296
296
|
<CR> open the selected file
|
@@ -298,22 +298,22 @@ has focus:
|
|
298
298
|
<C-s> open the selected file in a new split window
|
299
299
|
<C-v> open the selected file in a new vertical split window
|
300
300
|
<C-t> open the selected file in a new tab
|
301
|
-
<C-j> select next file in the
|
302
|
-
<C-n> select next file in the
|
303
|
-
<Down> select next file in the
|
304
|
-
<C-k> select previous file in the
|
305
|
-
<C-p> select previous file in the
|
306
|
-
<Up> select previous file in the
|
307
|
-
<C-c> cancel (dismisses
|
301
|
+
<C-j> select next file in the file listing
|
302
|
+
<C-n> select next file in the file listing
|
303
|
+
<Down> select next file in the file listing
|
304
|
+
<C-k> select previous file in the file listing
|
305
|
+
<C-p> select previous file in the file listing
|
306
|
+
<Up> select previous file in the file listing
|
307
|
+
<C-c> cancel (dismisses file listing)
|
308
308
|
|
309
309
|
The following is also available on terminals which support it:
|
310
310
|
|
311
|
-
<Esc> cancel (dismisses
|
311
|
+
<Esc> cancel (dismisses file listing)
|
312
312
|
|
313
313
|
Note that the default mappings can be overriden by setting options in your
|
314
314
|
~/.vimrc file (see the OPTIONS section for a full list of available options).
|
315
315
|
|
316
|
-
In addition, when the
|
316
|
+
In addition, when the file listing has focus, typing a character will cause
|
317
317
|
the selection to jump to the first path which begins with that character.
|
318
318
|
Typing multiple characters consecutively can be used to distinguish between
|
319
319
|
paths which begin with the same prefix.
|
@@ -322,14 +322,20 @@ paths which begin with the same prefix.
|
|
322
322
|
COMMANDS *command-t-commands*
|
323
323
|
|
324
324
|
*:CommandT*
|
325
|
-
|:CommandT| Brings up the Command-T
|
325
|
+
|:CommandT| Brings up the Command-T file window, starting in the
|
326
326
|
current working directory as returned by the|:pwd|
|
327
327
|
command.
|
328
328
|
|
329
|
+
*:CommandTBuffer*
|
330
|
+
|:CommandTBuffer|Brings up the Command-T buffer window.
|
331
|
+
This works exactly like the standard file window,
|
332
|
+
except that the selection is limited to files that
|
333
|
+
you already have open in buffers.
|
334
|
+
|
329
335
|
*:CommandTFlush*
|
330
336
|
|:CommandTFlush|Instructs the plug-in to flush its path cache, causing
|
331
337
|
the directory to be rescanned for new or deleted paths
|
332
|
-
the next time the
|
338
|
+
the next time the file window is shown. In addition, all
|
333
339
|
configuration settings are re-evaluated, causing any
|
334
340
|
changes made to settings via the |:let| command to be picked
|
335
341
|
up.
|
@@ -337,16 +343,18 @@ COMMANDS *command-t-commands*
|
|
337
343
|
|
338
344
|
MAPPINGS *command-t-mappings*
|
339
345
|
|
340
|
-
By default Command-T comes with only
|
346
|
+
By default Command-T comes with only two mappings:
|
341
347
|
|
342
|
-
<Leader>t bring up the Command-T
|
348
|
+
<Leader>t bring up the Command-T file window
|
349
|
+
<Leader>b bring up the Command-T buffer window
|
343
350
|
|
344
351
|
However, Command-T won't overwrite a pre-existing mapping so if you prefer
|
345
|
-
to define
|
352
|
+
to define different mappings use lines like these in your ~/.vimrc:
|
346
353
|
|
347
354
|
nmap <silent> <Leader>t :CommandT<CR>
|
355
|
+
nmap <silent> <Leader>b :CommandTBuffer<CR>
|
348
356
|
|
349
|
-
Replacing "<Leader>t" with your mapping of choice.
|
357
|
+
Replacing "<Leader>t" or "<Leader>b" with your mapping of choice.
|
350
358
|
|
351
359
|
Note that in the case of MacVim you actually can map to Command-T (written
|
352
360
|
as <D-t> in Vim) in your ~/.gvimrc file if you first unmap the existing menu
|
@@ -376,46 +384,54 @@ changes via |:let|.
|
|
376
384
|
|
377
385
|
Following is a list of all available options:
|
378
386
|
|
379
|
-
|
387
|
+
*g:CommandTMaxFiles*
|
380
388
|
|g:CommandTMaxFiles| number (default 10000)
|
381
389
|
|
382
390
|
The maximum number of files that will be considered when scanning the
|
383
|
-
current directory. Upon reaching this number scanning stops.
|
391
|
+
current directory. Upon reaching this number scanning stops. This
|
392
|
+
limit applies only to file listings and is ignored for buffer
|
393
|
+
listings.
|
384
394
|
|
385
|
-
|
395
|
+
*g:CommandTMaxDepth*
|
386
396
|
|g:CommandTMaxDepth| number (default 15)
|
387
397
|
|
388
398
|
The maximum depth (levels of recursion) to be explored when scanning the
|
389
399
|
current directory. Any directories at levels beyond this depth will be
|
390
400
|
skipped.
|
391
401
|
|
392
|
-
|
402
|
+
*g:CommandTMaxHeight*
|
393
403
|
|g:CommandTMaxHeight| number (default: 0)
|
394
404
|
|
395
405
|
The maximum height in lines the match window is allowed to expand to.
|
396
406
|
If set to 0, the window will occupy as much of the available space as
|
397
407
|
needed to show matching entries.
|
398
408
|
|
399
|
-
|
409
|
+
*g:CommandTAlwaysShowDotFiles*
|
400
410
|
|g:CommandTAlwaysShowDotFiles| boolean (default: 0)
|
401
411
|
|
402
|
-
|
403
|
-
string contains a dot that could cause a
|
404
|
-
a non-zero value, this setting instructs
|
405
|
-
matching dot-files in the match list
|
406
|
-
string contains a dot. See also
|
412
|
+
When showing the file listing Command-T will by default show dot-files
|
413
|
+
only if the entered search string contains a dot that could cause a
|
414
|
+
dot-file to match. When set to a non-zero value, this setting instructs
|
415
|
+
Command-T to always include matching dot-files in the match list
|
416
|
+
regardless of whether the search string contains a dot. See also
|
417
|
+
|g:CommandTNeverShowDotFiles|. Note that this setting only influences
|
418
|
+
the file listing; the buffer listing treats dot-files like any other
|
419
|
+
file.
|
407
420
|
|
408
|
-
|
421
|
+
*g:CommandTNeverShowDotFiles*
|
409
422
|
|g:CommandTNeverShowDotFiles| boolean (default: 0)
|
410
423
|
|
411
|
-
|
412
|
-
contains a dot that could cause a dot-file to
|
413
|
-
non-zero value, this setting instructs Command-T to
|
414
|
-
under any circumstances. Note that it is
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
424
|
+
In the file listing, Command-T will by default show dot-files if the
|
425
|
+
entered search string contains a dot that could cause a dot-file to
|
426
|
+
match. When set to a non-zero value, this setting instructs Command-T to
|
427
|
+
never show dot-files under any circumstances. Note that it is
|
428
|
+
contradictory to set both this setting and
|
429
|
+
|g:CommandTAlwaysShowDotFiles| to true, and if you do so Vim will suffer
|
430
|
+
from headaches, nervous twitches, and sudden mood swings. This setting
|
431
|
+
has no effect in buffer listings, where dot files are treated like any
|
432
|
+
other file.
|
433
|
+
|
434
|
+
*g:CommandTScanDotDirectories*
|
419
435
|
|g:CommandTScanDotDirectories| boolean (default: 0)
|
420
436
|
|
421
437
|
Normally Command-T will not recurse into "dot-directories" (directories
|
@@ -427,23 +443,33 @@ Following is a list of all available options:
|
|
427
443
|
(after scanning has been performed), whereas
|
428
444
|
|g:CommandTScanDotDirectories| affects the behaviour at scan-time.
|
429
445
|
|
430
|
-
Note also that even with this setting
|
446
|
+
Note also that even with this setting off you can still use Command-T to
|
431
447
|
open files inside a "dot-directory" such as ~/.vim, but you have to use
|
432
448
|
the |:cd| command to change into that directory first. For example:
|
433
449
|
|
434
450
|
:cd ~/.vim
|
435
451
|
:CommandT
|
436
452
|
|
437
|
-
|
453
|
+
*g:CommandTMatchWindowAtTop*
|
438
454
|
|g:CommandTMatchWindowAtTop| boolean (default: 0)
|
439
455
|
|
440
|
-
When this
|
456
|
+
When this setting is off (the default) the match window will appear at
|
441
457
|
the bottom so as to keep it near to the prompt. Turning it on causes the
|
442
458
|
match window to appear at the top instead. This may be preferable if you
|
443
459
|
want the best match (usually the first one) to appear in a fixed location
|
444
460
|
on the screen rather than moving as the number of matches changes during
|
445
461
|
typing.
|
446
462
|
|
463
|
+
*g:CommandTMatchWindowReverse*
|
464
|
+
|g:CommandTMatchWindowReverse| boolean (default: 0)
|
465
|
+
|
466
|
+
When this setting is off (the default) the matches will appear from
|
467
|
+
top to bottom with the topmost being selected. Turning it on causes the
|
468
|
+
matches to be reversed so the best match is at the bottom and the
|
469
|
+
initially selected match is the bottom most. This may be preferable if
|
470
|
+
you want the best match to appear in a fixed location on the screen
|
471
|
+
but still be near the prompt at the bottom.
|
472
|
+
|
447
473
|
As well as the basic options listed above, there are a number of settings that
|
448
474
|
can be used to override the default key mappings used by Command-T. For
|
449
475
|
example, to set <C-x> as the mapping for cancelling (dismissing) the Command-T
|
@@ -459,63 +485,63 @@ Following is a list of all map settings and their defaults:
|
|
459
485
|
|
460
486
|
Setting Default mapping(s)
|
461
487
|
|
462
|
-
|
488
|
+
*g:CommandTBackspaceMap*
|
463
489
|
|g:CommandTBackspaceMap| <BS>
|
464
490
|
|
465
|
-
|
491
|
+
*g:CommandTDeleteMap*
|
466
492
|
|g:CommandTDeleteMap| <Del>
|
467
493
|
|
468
|
-
|
494
|
+
*g:CommandTAcceptSelectionMap*
|
469
495
|
|g:CommandTAcceptSelectionMap| <CR>
|
470
496
|
|
471
|
-
|
497
|
+
*g:CommandTAcceptSelectionSplitMap*
|
472
498
|
|g:CommandTAcceptSelectionSplitMap| <C-CR>
|
473
|
-
|
499
|
+
<C-s>
|
474
500
|
|
475
|
-
|
501
|
+
*g:CommandTAcceptSelectionTabMap*
|
476
502
|
|g:CommandTAcceptSelectionTabMap| <C-t>
|
477
503
|
|
478
|
-
|
504
|
+
*g:CommandTAcceptSelectionVSplitMap*
|
479
505
|
|g:CommandTAcceptSelectionVSplitMap| <C-v>
|
480
506
|
|
481
|
-
|
507
|
+
*g:CommandTToggleFocusMap*
|
482
508
|
|g:CommandTToggleFocusMap| <Tab>
|
483
509
|
|
484
|
-
|
510
|
+
*g:CommandTCancelMap*
|
485
511
|
|g:CommandTCancelMap| <C-c>
|
486
|
-
|
512
|
+
<Esc> (not on all terminals)
|
487
513
|
|
488
|
-
|
514
|
+
*g:CommandTSelectNextMap*
|
489
515
|
|g:CommandTSelectNextMap| <C-n>
|
490
|
-
|
491
|
-
|
516
|
+
<C-j>
|
517
|
+
<Down>
|
492
518
|
|
493
|
-
|
519
|
+
*g:CommandTSelectPrevMap*
|
494
520
|
|g:CommandTSelectPrevMap| <C-p>
|
495
|
-
|
496
|
-
|
521
|
+
<C-k>
|
522
|
+
<Up>
|
497
523
|
|
498
|
-
|
524
|
+
*g:CommandTClearMap*
|
499
525
|
|g:CommandTClearMap| <C-u>
|
500
526
|
|
501
|
-
|
527
|
+
*g:CommandTCursorLeftMap*
|
502
528
|
|g:CommandTCursorLeftMap| <Left>
|
503
|
-
|
529
|
+
<C-h>
|
504
530
|
|
505
|
-
|
531
|
+
*g:CommandTCursorRightMap*
|
506
532
|
|g:CommandTCursorRightMap| <Right>
|
507
|
-
|
533
|
+
<C-l>
|
508
534
|
|
509
|
-
|
535
|
+
*g:CommandTCursorEndMap*
|
510
536
|
|g:CommandTCursorEndMap| <C-e>
|
511
537
|
|
512
|
-
|
538
|
+
*g:CommandTCursorStartMap*
|
513
539
|
|g:CommandTCursorStartMap| <C-a>
|
514
540
|
|
515
541
|
In addition to the options provided by Command-T itself, some of Vim's own
|
516
542
|
settings can be used to control behavior:
|
517
543
|
|
518
|
-
|
544
|
+
*command-t-wildignore*
|
519
545
|
|'wildignore'| string (default: '')
|
520
546
|
|
521
547
|
Vim's |'wildignore'| setting is used to determine which files should be
|
@@ -539,11 +565,14 @@ Command-T is written and maintained by Wincent Colaiuta <win@wincent.com>.
|
|
539
565
|
Other contributors that have submitted patches include (in alphabetical
|
540
566
|
order):
|
541
567
|
|
568
|
+
Daniel Hahler
|
542
569
|
Lucas de Vries
|
543
570
|
Matthew Todd
|
544
571
|
Mike Lundy
|
545
572
|
Scott Bronson
|
573
|
+
Steven Moazami
|
546
574
|
Sung Pae
|
575
|
+
Victor Hugo Borja
|
547
576
|
Zak Johnson
|
548
577
|
|
549
578
|
As this was the first Vim plug-in I had ever written I was heavily influenced
|
@@ -621,6 +650,27 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
621
650
|
|
622
651
|
HISTORY *command-t-history*
|
623
652
|
|
653
|
+
1.2.1 (30 April 2011)
|
654
|
+
|
655
|
+
- Remove duplicate copy of the documentation that was causing "Duplicate tag"
|
656
|
+
errors
|
657
|
+
- Mitigate issue with distracting blinking cursor in non-GUI versions of Vim
|
658
|
+
(patch from Steven Moazami)
|
659
|
+
|
660
|
+
1.2 (30 April 2011)
|
661
|
+
|
662
|
+
- added |g:CommandTMatchWindowReverse| option, to reverse the order of items
|
663
|
+
in the match listing (patch from Steven Moazami)
|
664
|
+
|
665
|
+
1.1b2 (26 March 2011)
|
666
|
+
|
667
|
+
- fix a glitch in the release process; the plugin itself is unchanged since
|
668
|
+
1.1b
|
669
|
+
|
670
|
+
1.1b (26 March 2011)
|
671
|
+
|
672
|
+
- add |:CommandTBuffer| command for quickly selecting among open buffers
|
673
|
+
|
624
674
|
1.0.1 (5 January 2011)
|
625
675
|
|
626
676
|
- work around bug when mapping |:CommandTFlush|, wherein the default mapping
|
Binary file
|
@@ -154,6 +154,7 @@ module CommandT
|
|
154
154
|
@selection += 1
|
155
155
|
print_match(@selection - 1) # redraw old selection (removes marker)
|
156
156
|
print_match(@selection) # redraw new selection (adds marker)
|
157
|
+
move_cursor_to_selected_line
|
157
158
|
else
|
158
159
|
# (possibly) loop or scroll
|
159
160
|
end
|
@@ -164,6 +165,7 @@ module CommandT
|
|
164
165
|
@selection -= 1
|
165
166
|
print_match(@selection + 1) # redraw old selection (removes marker)
|
166
167
|
print_match(@selection) # redraw new selection (adds marker)
|
168
|
+
move_cursor_to_selected_line
|
167
169
|
else
|
168
170
|
# (possibly) loop or scroll
|
169
171
|
end
|
@@ -175,6 +177,7 @@ module CommandT
|
|
175
177
|
@matches = matches
|
176
178
|
@selection = @reverse_list ? @matches.length - 1 : 0
|
177
179
|
print_matches
|
180
|
+
move_cursor_to_selected_line
|
178
181
|
end
|
179
182
|
end
|
180
183
|
|
@@ -229,6 +232,13 @@ module CommandT
|
|
229
232
|
|
230
233
|
private
|
231
234
|
|
235
|
+
def move_cursor_to_selected_line
|
236
|
+
# on some non-GUI terminals, the cursor doesn't hide properly
|
237
|
+
# so we move the cursor to prevent it from blinking away in the
|
238
|
+
# upper-left corner in a distracting fashion
|
239
|
+
@window.cursor = [@selection + 1, 0]
|
240
|
+
end
|
241
|
+
|
232
242
|
def print_error msg
|
233
243
|
return unless VIM::Window.select(@window)
|
234
244
|
unlock
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: command-t
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Wincent Colaiuta
|
@@ -18,7 +19,7 @@ date: 2011-01-05 00:00:00 -08:00
|
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
21
|
-
description: "
|
22
|
+
description: " Command-T provides a fast, intuitive mechanism for opening files with a\n minimal number of keystrokes. Its full functionality is only available when\n installed as a Vim plug-in, but it is also made available as a RubyGem so\n that other applications can make use of its searching algorithm.\n"
|
22
23
|
email: win@wincent.com
|
23
24
|
executables: []
|
24
25
|
|
@@ -33,6 +34,7 @@ files:
|
|
33
34
|
- Rakefile
|
34
35
|
- ruby/command-t/controller.rb
|
35
36
|
- ruby/command-t/depend
|
37
|
+
- ruby/command-t/ext.bundle
|
36
38
|
- ruby/command-t/ext.c
|
37
39
|
- ruby/command-t/ext.h
|
38
40
|
- ruby/command-t/extconf.rb
|
@@ -57,7 +59,6 @@ files:
|
|
57
59
|
- ruby/command-t/vim/window.rb
|
58
60
|
- ruby/command-t/vim.rb
|
59
61
|
- doc/command-t.txt
|
60
|
-
- doc/README.txt
|
61
62
|
- plugin/command-t.vim
|
62
63
|
has_rdoc: true
|
63
64
|
homepage: https://wincent.com/products/command-t
|
data/doc/README.txt
DELETED
@@ -1,779 +0,0 @@
|
|
1
|
-
*command-t.txt* Command-T plug-in for Vim *command-t*
|
2
|
-
|
3
|
-
CONTENTS *command-t-contents*
|
4
|
-
|
5
|
-
1. Introduction |command-t-intro|
|
6
|
-
2. Requirements |command-t-requirements|
|
7
|
-
3. Installation |command-t-installation|
|
8
|
-
3. Managing using Pathogen |command-t-pathogen|
|
9
|
-
4. Trouble-shooting |command-t-trouble-shooting|
|
10
|
-
5. Usage |command-t-usage|
|
11
|
-
6. Commands |command-t-commands|
|
12
|
-
7. Mappings |command-t-mappings|
|
13
|
-
8. Options |command-t-options|
|
14
|
-
9. Authors |command-t-authors|
|
15
|
-
10. Website |command-t-website|
|
16
|
-
11. Donations |command-t-donations|
|
17
|
-
12. License |command-t-license|
|
18
|
-
13. History |command-t-history|
|
19
|
-
|
20
|
-
|
21
|
-
INTRODUCTION *command-t-intro*
|
22
|
-
|
23
|
-
The Command-T plug-in provides an extremely fast, intuitive mechanism for
|
24
|
-
opening files and buffers with a minimal number of keystrokes. It's named
|
25
|
-
"Command-T" because it is inspired by the "Go to File" window bound to
|
26
|
-
Command-T in TextMate.
|
27
|
-
|
28
|
-
Files are selected by typing characters that appear in their paths, and are
|
29
|
-
ordered by an algorithm which knows that characters that appear in certain
|
30
|
-
locations (for example, immediately after a path separator) should be given
|
31
|
-
more weight.
|
32
|
-
|
33
|
-
To search efficiently, especially in large projects, you should adopt a
|
34
|
-
"path-centric" rather than a "filename-centric" mentality. That is you should
|
35
|
-
think more about where the desired file is found rather than what it is
|
36
|
-
called. This means narrowing your search down by including some characters
|
37
|
-
from the upper path components rather than just entering characters from the
|
38
|
-
filename itself.
|
39
|
-
|
40
|
-
Screencasts demonstrating the plug-in can be viewed at:
|
41
|
-
|
42
|
-
https://wincent.com/products/command-t
|
43
|
-
|
44
|
-
|
45
|
-
REQUIREMENTS *command-t-requirements*
|
46
|
-
|
47
|
-
The plug-in requires Vim compiled with Ruby support, a compatible Ruby
|
48
|
-
installation at the operating system level, and a C compiler to build
|
49
|
-
the Ruby extension.
|
50
|
-
|
51
|
-
|
52
|
-
1. Vim compiled with Ruby support
|
53
|
-
|
54
|
-
You can check for Ruby support by launching Vim with the --version switch:
|
55
|
-
|
56
|
-
vim --version
|
57
|
-
|
58
|
-
If "+ruby" appears in the version information then your version of Vim has
|
59
|
-
Ruby support.
|
60
|
-
|
61
|
-
Another way to check is to simply try using the :ruby command from within Vim
|
62
|
-
itself:
|
63
|
-
|
64
|
-
:ruby 1
|
65
|
-
|
66
|
-
If your Vim lacks support you'll see an error message like this:
|
67
|
-
|
68
|
-
E319: Sorry, the command is not available in this version
|
69
|
-
|
70
|
-
The version of Vim distributed with Mac OS X does not include Ruby support,
|
71
|
-
while MacVim does; it is available from:
|
72
|
-
|
73
|
-
http://github.com/b4winckler/macvim/downloads
|
74
|
-
|
75
|
-
For Windows users, the Vim 7.2 executable available from www.vim.org does
|
76
|
-
include Ruby support, and is recommended over version 7.3 (which links against
|
77
|
-
Ruby 1.9, but apparently has some bugs that need to be resolved).
|
78
|
-
|
79
|
-
|
80
|
-
2. Ruby
|
81
|
-
|
82
|
-
In addition to having Ruby support in Vim, your system itself must have a
|
83
|
-
compatible Ruby install. "Compatible" means the same version as Vim itself
|
84
|
-
links against. If you use a different version then Command-T is unlikely
|
85
|
-
to work (see TROUBLE-SHOOTING below).
|
86
|
-
|
87
|
-
On Mac OS X Snow Leopard, the system comes with Ruby 1.8.7 and all recent
|
88
|
-
versions of MacVim (the 7.2 snapshots and 7.3) are linked against it.
|
89
|
-
|
90
|
-
On Linux and similar platforms, the linked version of Ruby will depend on
|
91
|
-
your distribution. You can usually find this out by examining the
|
92
|
-
compilation and linking flags displayed by the |:version| command in Vim, and
|
93
|
-
by looking at the output of:
|
94
|
-
|
95
|
-
:ruby puts RUBY_VERSION
|
96
|
-
|
97
|
-
A suitable Ruby environment for Windows can be installed using the Ruby
|
98
|
-
1.8.7-p299 RubyInstaller available at:
|
99
|
-
|
100
|
-
http://rubyinstaller.org/downloads/archives
|
101
|
-
|
102
|
-
If using RubyInstaller be sure to download the installer executable, not the
|
103
|
-
7-zip archive. When installing mark the checkbox "Add Ruby executables to your
|
104
|
-
PATH" so that Vim can find them.
|
105
|
-
|
106
|
-
|
107
|
-
3. C compiler
|
108
|
-
|
109
|
-
Part of Command-T is implemented in C as a Ruby extension for speed, allowing
|
110
|
-
it to work responsively even on directory hierarchies containing enormous
|
111
|
-
numbers of files. As such, a C compiler is required in order to build the
|
112
|
-
extension and complete the installation.
|
113
|
-
|
114
|
-
On Mac OS X, this can be obtained by installing the Xcode Tools that come on
|
115
|
-
the Mac OS X install disc.
|
116
|
-
|
117
|
-
On Windows, the RubyInstaller Development Kit can be used to conveniently
|
118
|
-
install the necessary tool chain:
|
119
|
-
|
120
|
-
http://rubyinstaller.org/downloads/archives
|
121
|
-
|
122
|
-
At the time of writing, the appropriate development kit for use with Ruby
|
123
|
-
1.8.7 is DevKit-3.4.5r3-20091110.
|
124
|
-
|
125
|
-
To use the Development Kit extract the archive contents to your C:\Ruby
|
126
|
-
folder.
|
127
|
-
|
128
|
-
|
129
|
-
INSTALLATION *command-t-installation*
|
130
|
-
|
131
|
-
Command-T is distributed as a "vimball" which means that it can be installed
|
132
|
-
by opening it in Vim and then sourcing it:
|
133
|
-
|
134
|
-
:e command-t.vba
|
135
|
-
:so %
|
136
|
-
|
137
|
-
The files will be installed in your |'runtimepath'|. To check where this is
|
138
|
-
you can issue:
|
139
|
-
|
140
|
-
:echo &rtp
|
141
|
-
|
142
|
-
The C extension must then be built, which can be done from the shell. If you
|
143
|
-
use a typical |'runtimepath'| then the files were installed inside ~/.vim and
|
144
|
-
you can build the extension with:
|
145
|
-
|
146
|
-
cd ~/.vim/ruby/command-t
|
147
|
-
ruby extconf.rb
|
148
|
-
make
|
149
|
-
|
150
|
-
Note: If you are an RVM user, you must perform the build using the same
|
151
|
-
version of Ruby that Vim itself is linked against. This will often be the
|
152
|
-
system Ruby, which can be selected before issuing the "make" command with:
|
153
|
-
|
154
|
-
rvm use system
|
155
|
-
|
156
|
-
|
157
|
-
MANAGING USING PATHOGEN *command-t-pathogen*
|
158
|
-
|
159
|
-
Pathogen is a plugin that allows you to maintain plugin installations in
|
160
|
-
separate, isolated subdirectories under the "bundle" directory in your
|
161
|
-
|'runtimepath'|. The following examples assume that you already have
|
162
|
-
Pathogen installed and configured, and that you are installing into
|
163
|
-
~/.vim/bundle. For more information about Pathogen, see:
|
164
|
-
|
165
|
-
http://www.vim.org/scripts/script.php?script_id=2332
|
166
|
-
|
167
|
-
If you manage your entire ~/.vim folder using Git then you can add the
|
168
|
-
Command-T repository as a submodule:
|
169
|
-
|
170
|
-
cd ~/.vim
|
171
|
-
git submodule add git://git.wincent.com/command-t.git bundle/command-t
|
172
|
-
git submodule init
|
173
|
-
|
174
|
-
Or if you just wish to do a simple clone instead of using submodules:
|
175
|
-
|
176
|
-
cd ~/.vim
|
177
|
-
git clone git://git.wincent.com/command-t.git bundle/command-t
|
178
|
-
|
179
|
-
Once you have a local copy of the repository you can update it at any time
|
180
|
-
with:
|
181
|
-
|
182
|
-
cd ~/.vim/bundle/command-t
|
183
|
-
git pull
|
184
|
-
|
185
|
-
Or you can switch to a specific release with:
|
186
|
-
|
187
|
-
cd ~/.vim/bundle/command-t
|
188
|
-
git checkout 0.8b
|
189
|
-
|
190
|
-
After installing or updating you must build the extension:
|
191
|
-
|
192
|
-
cd ~/.vim/bundle/command-t
|
193
|
-
rake make
|
194
|
-
|
195
|
-
While the Vimball installation automatically generates the help tags, under
|
196
|
-
Pathogen it is necessary to do so explicitly from inside Vim:
|
197
|
-
|
198
|
-
:call pathogen#helptags()
|
199
|
-
|
200
|
-
|
201
|
-
TROUBLE-SHOOTING *command-t-trouble-shooting*
|
202
|
-
|
203
|
-
Most installation problems are caused by a mismatch between the version of
|
204
|
-
Ruby on the host operating system, and the version of Ruby that Vim itself
|
205
|
-
linked against at compile time. For example, if one is 32-bit and the other is
|
206
|
-
64-bit, or one is from the Ruby 1.9 series and the other is from the 1.8
|
207
|
-
series, then the plug-in is not likely to work.
|
208
|
-
|
209
|
-
As such, on Mac OS X, I recommend using the standard Ruby that comes with the
|
210
|
-
system (currently 1.8.7) along with the latest version of MacVim (currently
|
211
|
-
version 7.3). If you wish to use custom builds of Ruby or of MacVim (not
|
212
|
-
recommmended) then you will have to take extra care to ensure that the exact
|
213
|
-
same Ruby environment is in effect when building Ruby, Vim and the Command-T
|
214
|
-
extension.
|
215
|
-
|
216
|
-
For Windows, the following combination is known to work:
|
217
|
-
|
218
|
-
- Vim 7.2 from http://www.vim.org/download.php:
|
219
|
-
ftp://ftp.vim.org/pub/vim/pc/gvim72.exe
|
220
|
-
- Ruby 1.8.7-p299 from http://rubyinstaller.org/downloads/archives:
|
221
|
-
http://rubyforge.org/frs/download.php/71492/rubyinstaller-1.8.7-p299.exe
|
222
|
-
- DevKit 3.4.5r3-20091110 from http://rubyinstaller.org/downloads/archives:
|
223
|
-
http://rubyforge.org/frs/download.php/66888/devkit-3.4.5r3-20091110.7z
|
224
|
-
|
225
|
-
If a problem occurs the first thing you should do is inspect the output of:
|
226
|
-
|
227
|
-
ruby extconf.rb
|
228
|
-
make
|
229
|
-
|
230
|
-
During the installation, and:
|
231
|
-
|
232
|
-
vim --version
|
233
|
-
|
234
|
-
And compare the compilation and linker flags that were passed to the
|
235
|
-
extension and to Vim itself when they were built. If the Ruby-related
|
236
|
-
flags or architecture flags are different then it is likely that something
|
237
|
-
has changed in your Ruby environment and the extension may not work until
|
238
|
-
you eliminate the discrepancy.
|
239
|
-
|
240
|
-
|
241
|
-
USAGE *command-t-usage*
|
242
|
-
|
243
|
-
Bring up the Command-T file window by typing:
|
244
|
-
|
245
|
-
<Leader>t
|
246
|
-
|
247
|
-
This mapping is set up automatically for you, provided you do not already have
|
248
|
-
a mapping for <Leader>t or |:CommandT|. You can also bring up the file window
|
249
|
-
by issuing the command:
|
250
|
-
|
251
|
-
:CommandT
|
252
|
-
|
253
|
-
A prompt will appear at the bottom of the screen along with a file window
|
254
|
-
showing all of the files in the current directory (as returned by the
|
255
|
-
|:pwd| command).
|
256
|
-
|
257
|
-
For the most efficient file navigation within a project it's recommended that
|
258
|
-
you |:cd| into the root directory of your project when starting to work on it.
|
259
|
-
If you wish to open a file from outside of the project folder you can pass in
|
260
|
-
an optional path argument (relative or absolute) to |:CommandT|:
|
261
|
-
|
262
|
-
:CommandT ../path/to/other/files
|
263
|
-
|
264
|
-
Type letters in the prompt to narrow down the selection, showing only the
|
265
|
-
files whose paths contain those letters in the specified order. Letters do not
|
266
|
-
need to appear consecutively in a path in order for it to be classified as a
|
267
|
-
match.
|
268
|
-
|
269
|
-
Once the desired file has been selected it can be opened by pressing <CR>.
|
270
|
-
(By default files are opened in the current window, but there are other
|
271
|
-
mappings that you can use to open in a vertical or horizontal split, or in
|
272
|
-
a new tab.) Note that if you have |'nohidden'| set and there are unsaved
|
273
|
-
changes in the current window when you press <CR> then opening in the current
|
274
|
-
window would fail; in this case Command-T will open the file in a new split.
|
275
|
-
|
276
|
-
The following mappings are active when the prompt has focus:
|
277
|
-
|
278
|
-
<BS> delete the character to the left of the cursor
|
279
|
-
<Del> delete the character at the cursor
|
280
|
-
<Left> move the cursor one character to the left
|
281
|
-
<C-h> move the cursor one character to the left
|
282
|
-
<Right> move the cursor one character to the right
|
283
|
-
<C-l> move the cursor one character to the right
|
284
|
-
<C-a> move the cursor to the start (left)
|
285
|
-
<C-e> move the cursor to the end (right)
|
286
|
-
<C-u> clear the contents of the prompt
|
287
|
-
<Tab> change focus to the file listing
|
288
|
-
|
289
|
-
The following mappings are active when the file listing has focus:
|
290
|
-
|
291
|
-
<Tab> change focus to the prompt
|
292
|
-
|
293
|
-
The following mappings are active when either the prompt or the file listing
|
294
|
-
has focus:
|
295
|
-
|
296
|
-
<CR> open the selected file
|
297
|
-
<C-CR> open the selected file in a new split window
|
298
|
-
<C-s> open the selected file in a new split window
|
299
|
-
<C-v> open the selected file in a new vertical split window
|
300
|
-
<C-t> open the selected file in a new tab
|
301
|
-
<C-j> select next file in the file listing
|
302
|
-
<C-n> select next file in the file listing
|
303
|
-
<Down> select next file in the file listing
|
304
|
-
<C-k> select previous file in the file listing
|
305
|
-
<C-p> select previous file in the file listing
|
306
|
-
<Up> select previous file in the file listing
|
307
|
-
<C-c> cancel (dismisses file listing)
|
308
|
-
|
309
|
-
The following is also available on terminals which support it:
|
310
|
-
|
311
|
-
<Esc> cancel (dismisses file listing)
|
312
|
-
|
313
|
-
Note that the default mappings can be overriden by setting options in your
|
314
|
-
~/.vimrc file (see the OPTIONS section for a full list of available options).
|
315
|
-
|
316
|
-
In addition, when the file listing has focus, typing a character will cause
|
317
|
-
the selection to jump to the first path which begins with that character.
|
318
|
-
Typing multiple characters consecutively can be used to distinguish between
|
319
|
-
paths which begin with the same prefix.
|
320
|
-
|
321
|
-
|
322
|
-
COMMANDS *command-t-commands*
|
323
|
-
|
324
|
-
*:CommandT*
|
325
|
-
|:CommandT| Brings up the Command-T file window, starting in the
|
326
|
-
current working directory as returned by the|:pwd|
|
327
|
-
command.
|
328
|
-
|
329
|
-
*:CommandTBuffer*
|
330
|
-
|:CommandTBuffer|Brings up the Command-T buffer window.
|
331
|
-
This works exactly like the standard file window,
|
332
|
-
except that the selection is limited to files that
|
333
|
-
you already have open in buffers.
|
334
|
-
|
335
|
-
*:CommandTFlush*
|
336
|
-
|:CommandTFlush|Instructs the plug-in to flush its path cache, causing
|
337
|
-
the directory to be rescanned for new or deleted paths
|
338
|
-
the next time the file window is shown. In addition, all
|
339
|
-
configuration settings are re-evaluated, causing any
|
340
|
-
changes made to settings via the |:let| command to be picked
|
341
|
-
up.
|
342
|
-
|
343
|
-
|
344
|
-
MAPPINGS *command-t-mappings*
|
345
|
-
|
346
|
-
By default Command-T comes with only two mappings:
|
347
|
-
|
348
|
-
<Leader>t bring up the Command-T file window
|
349
|
-
<Leader>b bring up the Command-T buffer window
|
350
|
-
|
351
|
-
However, Command-T won't overwrite a pre-existing mapping so if you prefer
|
352
|
-
to define different mappings use lines like these in your ~/.vimrc:
|
353
|
-
|
354
|
-
nmap <silent> <Leader>t :CommandT<CR>
|
355
|
-
nmap <silent> <Leader>b :CommandTBuffer<CR>
|
356
|
-
|
357
|
-
Replacing "<Leader>t" or "<Leader>b" with your mapping of choice.
|
358
|
-
|
359
|
-
Note that in the case of MacVim you actually can map to Command-T (written
|
360
|
-
as <D-t> in Vim) in your ~/.gvimrc file if you first unmap the existing menu
|
361
|
-
binding of Command-T to "New Tab":
|
362
|
-
|
363
|
-
if has("gui_macvim")
|
364
|
-
macmenu &File.New\ Tab key=<nop>
|
365
|
-
map <D-t> :CommandT<CR>
|
366
|
-
endif
|
367
|
-
|
368
|
-
When the Command-T window is active a number of other additional mappings
|
369
|
-
become available for doing things like moving between and selecting matches.
|
370
|
-
These are fully described above in the USAGE section, and settings for
|
371
|
-
overriding the mappings are listed below under OPTIONS.
|
372
|
-
|
373
|
-
|
374
|
-
OPTIONS *command-t-options*
|
375
|
-
|
376
|
-
A number of options may be set in your ~/.vimrc to influence the behaviour of
|
377
|
-
the plug-in. To set an option, you include a line like this in your ~/.vimrc:
|
378
|
-
|
379
|
-
let g:CommandTMaxFiles=20000
|
380
|
-
|
381
|
-
To have Command-T pick up new settings immediately (that is, without having
|
382
|
-
to restart Vim) you can issue the |:CommandTFlush| command after making
|
383
|
-
changes via |:let|.
|
384
|
-
|
385
|
-
Following is a list of all available options:
|
386
|
-
|
387
|
-
*g:CommandTMaxFiles*
|
388
|
-
|g:CommandTMaxFiles| number (default 10000)
|
389
|
-
|
390
|
-
The maximum number of files that will be considered when scanning the
|
391
|
-
current directory. Upon reaching this number scanning stops. This
|
392
|
-
limit applies only to file listings and is ignored for buffer
|
393
|
-
listings.
|
394
|
-
|
395
|
-
*g:CommandTMaxDepth*
|
396
|
-
|g:CommandTMaxDepth| number (default 15)
|
397
|
-
|
398
|
-
The maximum depth (levels of recursion) to be explored when scanning the
|
399
|
-
current directory. Any directories at levels beyond this depth will be
|
400
|
-
skipped.
|
401
|
-
|
402
|
-
*g:CommandTMaxHeight*
|
403
|
-
|g:CommandTMaxHeight| number (default: 0)
|
404
|
-
|
405
|
-
The maximum height in lines the match window is allowed to expand to.
|
406
|
-
If set to 0, the window will occupy as much of the available space as
|
407
|
-
needed to show matching entries.
|
408
|
-
|
409
|
-
*g:CommandTAlwaysShowDotFiles*
|
410
|
-
|g:CommandTAlwaysShowDotFiles| boolean (default: 0)
|
411
|
-
|
412
|
-
When showing the file listing Command-T will by default show dot-files
|
413
|
-
only if the entered search string contains a dot that could cause a
|
414
|
-
dot-file to match. When set to a non-zero value, this setting instructs
|
415
|
-
Command-T to always include matching dot-files in the match list
|
416
|
-
regardless of whether the search string contains a dot. See also
|
417
|
-
|g:CommandTNeverShowDotFiles|. Note that this setting only influences
|
418
|
-
the file listing; the buffer listing treats dot-files like any other
|
419
|
-
file.
|
420
|
-
|
421
|
-
*g:CommandTNeverShowDotFiles*
|
422
|
-
|g:CommandTNeverShowDotFiles| boolean (default: 0)
|
423
|
-
|
424
|
-
In the file listing, Command-T will by default show dot-files if the
|
425
|
-
entered search string contains a dot that could cause a dot-file to
|
426
|
-
match. When set to a non-zero value, this setting instructs Command-T to
|
427
|
-
never show dot-files under any circumstances. Note that it is
|
428
|
-
contradictory to set both this setting and
|
429
|
-
|g:CommandTAlwaysShowDotFiles| to true, and if you do so Vim will suffer
|
430
|
-
from headaches, nervous twitches, and sudden mood swings. This setting
|
431
|
-
has no effect in buffer listings, where dot files are treated like any
|
432
|
-
other file.
|
433
|
-
|
434
|
-
*g:CommandTScanDotDirectories*
|
435
|
-
|g:CommandTScanDotDirectories| boolean (default: 0)
|
436
|
-
|
437
|
-
Normally Command-T will not recurse into "dot-directories" (directories
|
438
|
-
whose names begin with a dot) while performing its initial scan. Set
|
439
|
-
this setting to a non-zero value to override this behavior and recurse.
|
440
|
-
Note that this setting is completely independent of the
|
441
|
-
|g:CommandTAlwaysShowDotFiles| and |g:CommandTNeverShowDotFiles|
|
442
|
-
settings; those apply only to the selection and display of matches
|
443
|
-
(after scanning has been performed), whereas
|
444
|
-
|g:CommandTScanDotDirectories| affects the behaviour at scan-time.
|
445
|
-
|
446
|
-
Note also that even with this setting off you can still use Command-T to
|
447
|
-
open files inside a "dot-directory" such as ~/.vim, but you have to use
|
448
|
-
the |:cd| command to change into that directory first. For example:
|
449
|
-
|
450
|
-
:cd ~/.vim
|
451
|
-
:CommandT
|
452
|
-
|
453
|
-
*g:CommandTMatchWindowAtTop*
|
454
|
-
|g:CommandTMatchWindowAtTop| boolean (default: 0)
|
455
|
-
|
456
|
-
When this setting is off (the default) the match window will appear at
|
457
|
-
the bottom so as to keep it near to the prompt. Turning it on causes the
|
458
|
-
match window to appear at the top instead. This may be preferable if you
|
459
|
-
want the best match (usually the first one) to appear in a fixed location
|
460
|
-
on the screen rather than moving as the number of matches changes during
|
461
|
-
typing.
|
462
|
-
|
463
|
-
*g:CommandTMatchWindowReverse*
|
464
|
-
|g:CommandTMatchWindowReverse| boolean (default: 0)
|
465
|
-
|
466
|
-
When this setting is off (the default) the matches will appear from
|
467
|
-
top to bottom with the topmost being selected. Turning it on causes the
|
468
|
-
matches to be reversed so the best match is at the bottom and the
|
469
|
-
initially selected match is the bottom most. This may be preferable if
|
470
|
-
you want the best match to appear in a fixed location on the screen
|
471
|
-
but still be near the prompt at the bottom.
|
472
|
-
|
473
|
-
As well as the basic options listed above, there are a number of settings that
|
474
|
-
can be used to override the default key mappings used by Command-T. For
|
475
|
-
example, to set <C-x> as the mapping for cancelling (dismissing) the Command-T
|
476
|
-
window, you would add the following to your ~/.vimrc:
|
477
|
-
|
478
|
-
let g:CommandTCancelMap='<C-x>'
|
479
|
-
|
480
|
-
Multiple, alternative mappings may be specified using list syntax:
|
481
|
-
|
482
|
-
let g:CommandTCancelMap=['<C-x>', '<C-c>']
|
483
|
-
|
484
|
-
Following is a list of all map settings and their defaults:
|
485
|
-
|
486
|
-
Setting Default mapping(s)
|
487
|
-
|
488
|
-
*g:CommandTBackspaceMap*
|
489
|
-
|g:CommandTBackspaceMap| <BS>
|
490
|
-
|
491
|
-
*g:CommandTDeleteMap*
|
492
|
-
|g:CommandTDeleteMap| <Del>
|
493
|
-
|
494
|
-
*g:CommandTAcceptSelectionMap*
|
495
|
-
|g:CommandTAcceptSelectionMap| <CR>
|
496
|
-
|
497
|
-
*g:CommandTAcceptSelectionSplitMap*
|
498
|
-
|g:CommandTAcceptSelectionSplitMap| <C-CR>
|
499
|
-
<C-s>
|
500
|
-
|
501
|
-
*g:CommandTAcceptSelectionTabMap*
|
502
|
-
|g:CommandTAcceptSelectionTabMap| <C-t>
|
503
|
-
|
504
|
-
*g:CommandTAcceptSelectionVSplitMap*
|
505
|
-
|g:CommandTAcceptSelectionVSplitMap| <C-v>
|
506
|
-
|
507
|
-
*g:CommandTToggleFocusMap*
|
508
|
-
|g:CommandTToggleFocusMap| <Tab>
|
509
|
-
|
510
|
-
*g:CommandTCancelMap*
|
511
|
-
|g:CommandTCancelMap| <C-c>
|
512
|
-
<Esc> (not on all terminals)
|
513
|
-
|
514
|
-
*g:CommandTSelectNextMap*
|
515
|
-
|g:CommandTSelectNextMap| <C-n>
|
516
|
-
<C-j>
|
517
|
-
<Down>
|
518
|
-
|
519
|
-
*g:CommandTSelectPrevMap*
|
520
|
-
|g:CommandTSelectPrevMap| <C-p>
|
521
|
-
<C-k>
|
522
|
-
<Up>
|
523
|
-
|
524
|
-
*g:CommandTClearMap*
|
525
|
-
|g:CommandTClearMap| <C-u>
|
526
|
-
|
527
|
-
*g:CommandTCursorLeftMap*
|
528
|
-
|g:CommandTCursorLeftMap| <Left>
|
529
|
-
<C-h>
|
530
|
-
|
531
|
-
*g:CommandTCursorRightMap*
|
532
|
-
|g:CommandTCursorRightMap| <Right>
|
533
|
-
<C-l>
|
534
|
-
|
535
|
-
*g:CommandTCursorEndMap*
|
536
|
-
|g:CommandTCursorEndMap| <C-e>
|
537
|
-
|
538
|
-
*g:CommandTCursorStartMap*
|
539
|
-
|g:CommandTCursorStartMap| <C-a>
|
540
|
-
|
541
|
-
In addition to the options provided by Command-T itself, some of Vim's own
|
542
|
-
settings can be used to control behavior:
|
543
|
-
|
544
|
-
*command-t-wildignore*
|
545
|
-
|'wildignore'| string (default: '')
|
546
|
-
|
547
|
-
Vim's |'wildignore'| setting is used to determine which files should be
|
548
|
-
excluded from listings. This is a comma-separated list of glob patterns.
|
549
|
-
It defaults to the empty string, but common settings include "*.o,*.obj"
|
550
|
-
(to exclude object files) or ".git,.svn" (to exclude SCM metadata
|
551
|
-
directories). For example:
|
552
|
-
|
553
|
-
:set wildignore+=*.o,*.obj,.git
|
554
|
-
|
555
|
-
A pattern such as "vendor/rails/**" would exclude all files and
|
556
|
-
subdirectories inside the "vendor/rails" directory (relative to
|
557
|
-
directory Command-T starts in).
|
558
|
-
|
559
|
-
See the |'wildignore'| documentation for more information.
|
560
|
-
|
561
|
-
|
562
|
-
AUTHORS *command-t-authors*
|
563
|
-
|
564
|
-
Command-T is written and maintained by Wincent Colaiuta <win@wincent.com>.
|
565
|
-
Other contributors that have submitted patches include (in alphabetical
|
566
|
-
order):
|
567
|
-
|
568
|
-
Daniel Hahler
|
569
|
-
Lucas de Vries
|
570
|
-
Matthew Todd
|
571
|
-
Mike Lundy
|
572
|
-
Scott Bronson
|
573
|
-
Steven Moazami
|
574
|
-
Sung Pae
|
575
|
-
Victor Hugo Borja
|
576
|
-
Zak Johnson
|
577
|
-
|
578
|
-
As this was the first Vim plug-in I had ever written I was heavily influenced
|
579
|
-
by the design of the LustyExplorer plug-in by Stephen Bach, which I understand
|
580
|
-
is one of the largest Ruby-based Vim plug-ins to date.
|
581
|
-
|
582
|
-
While the Command-T codebase doesn't contain any code directly copied from
|
583
|
-
LustyExplorer, I did use it as a reference for answers to basic questions (like
|
584
|
-
"How do you do 'X' in a Ruby-based Vim plug-in?"), and also copied some basic
|
585
|
-
architectural decisions (like the division of the code into Prompt, Settings
|
586
|
-
and MatchWindow classes).
|
587
|
-
|
588
|
-
LustyExplorer is available from:
|
589
|
-
|
590
|
-
http://www.vim.org/scripts/script.php?script_id=1890
|
591
|
-
|
592
|
-
|
593
|
-
WEBSITE *command-t-website*
|
594
|
-
|
595
|
-
The official website for Command-T is:
|
596
|
-
|
597
|
-
https://wincent.com/products/command-t
|
598
|
-
|
599
|
-
The latest release will always be available from there.
|
600
|
-
|
601
|
-
Development in progress can be inspected via the project's Git repository
|
602
|
-
browser at:
|
603
|
-
|
604
|
-
https://wincent.com/repos/command-t
|
605
|
-
|
606
|
-
A copy of each release is also available from the official Vim scripts site
|
607
|
-
at:
|
608
|
-
|
609
|
-
http://www.vim.org/scripts/script.php?script_id=3025
|
610
|
-
|
611
|
-
Bug reports should be submitted to the issue tracker at:
|
612
|
-
|
613
|
-
https://wincent.com/issues
|
614
|
-
|
615
|
-
|
616
|
-
DONATIONS *command-t-donations*
|
617
|
-
|
618
|
-
Command-T itself is free software released under the terms of the BSD license.
|
619
|
-
If you would like to support further development you can make a donation via
|
620
|
-
PayPal to win@wincent.com:
|
621
|
-
|
622
|
-
https://wincent.com/products/command-t/donations
|
623
|
-
|
624
|
-
|
625
|
-
LICENSE *command-t-license*
|
626
|
-
|
627
|
-
Copyright 2010-2011 Wincent Colaiuta. All rights reserved.
|
628
|
-
|
629
|
-
Redistribution and use in source and binary forms, with or without
|
630
|
-
modification, are permitted provided that the following conditions are met:
|
631
|
-
|
632
|
-
1. Redistributions of source code must retain the above copyright notice,
|
633
|
-
this list of conditions and the following disclaimer.
|
634
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
635
|
-
this list of conditions and the following disclaimer in the documentation
|
636
|
-
and/or other materials provided with the distribution.
|
637
|
-
|
638
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
639
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
640
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
641
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
642
|
-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
643
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
644
|
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
645
|
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
646
|
-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
647
|
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
648
|
-
POSSIBILITY OF SUCH DAMAGE.
|
649
|
-
|
650
|
-
|
651
|
-
HISTORY *command-t-history*
|
652
|
-
|
653
|
-
1.2 (30 April 2011)
|
654
|
-
|
655
|
-
- added |g:CommandTMatchWindowReverse| option, to reverse the order of items
|
656
|
-
in the match listing (patch from Steven Moazami)
|
657
|
-
|
658
|
-
1.1b2 (26 March 2011)
|
659
|
-
|
660
|
-
- fix a glitch in the release process; the plugin itself is unchanged since
|
661
|
-
1.1b
|
662
|
-
|
663
|
-
1.1b (26 March 2011)
|
664
|
-
|
665
|
-
- add |:CommandTBuffer| command for quickly selecting among open buffers
|
666
|
-
|
667
|
-
1.0.1 (5 January 2011)
|
668
|
-
|
669
|
-
- work around bug when mapping |:CommandTFlush|, wherein the default mapping
|
670
|
-
for |:CommandT| would not be set up
|
671
|
-
- clean up when leaving the Command-T buffer via unexpected means (such as
|
672
|
-
with <C-W k> or similar)
|
673
|
-
|
674
|
-
1.0 (26 November 2010)
|
675
|
-
|
676
|
-
- make relative path simplification work on Windows
|
677
|
-
|
678
|
-
1.0b (5 November 2010)
|
679
|
-
|
680
|
-
- work around platform-specific Vim 7.3 bug seen by some users (wherein
|
681
|
-
Vim always falsely reports to Ruby that the buffer numbers is 0)
|
682
|
-
- re-use the buffer that is used to show the match listing, rather than
|
683
|
-
throwing it away and recreating it each time Command-T is shown; this
|
684
|
-
stops the buffer numbers from creeping up needlessly
|
685
|
-
|
686
|
-
0.9 (8 October 2010)
|
687
|
-
|
688
|
-
- use relative paths when opening files inside the current working directory
|
689
|
-
in order to keep buffer listings as brief as possible (patch from Matthew
|
690
|
-
Todd)
|
691
|
-
|
692
|
-
0.8.1 (14 September 2010)
|
693
|
-
|
694
|
-
- fix mapping issues for users who have set |'notimeout'| (patch from Sung
|
695
|
-
Pae)
|
696
|
-
|
697
|
-
0.8 (19 August 2010)
|
698
|
-
|
699
|
-
- overrides for the default mappings can now be lists of strings, allowing
|
700
|
-
multiple mappings to be defined for any given action
|
701
|
-
- <Leader>t mapping only set up if no other map for |:CommandT| exists
|
702
|
-
(patch from Scott Bronson)
|
703
|
-
- prevent folds from appearing in the match listing
|
704
|
-
- tweaks to avoid the likelihood of "Not enough room" errors when trying to
|
705
|
-
open files
|
706
|
-
- watch out for "nil" windows when restoring window dimensions
|
707
|
-
- optimizations (avoid some repeated downcasing)
|
708
|
-
- move all Ruby files under the "command-t" subdirectory and avoid polluting
|
709
|
-
the "Vim" module namespace
|
710
|
-
|
711
|
-
0.8b (11 July 2010)
|
712
|
-
|
713
|
-
- large overhaul of the scoring algorithm to make the ordering of returned
|
714
|
-
results more intuitive; given the scope of the changes and room for
|
715
|
-
optimization of the new algorithm, this release is labelled as "beta"
|
716
|
-
|
717
|
-
0.7 (10 June 2010)
|
718
|
-
|
719
|
-
- handle more |'wildignore'| patterns by delegating to Vim's own |expand()|
|
720
|
-
function; with this change it is now viable to exclude patterns such as
|
721
|
-
'vendor/rails/**' in addition to filename-only patterns like '*.o' and
|
722
|
-
'.git' (patch from Mike Lundy)
|
723
|
-
- always sort results alphabetically for empty search strings; this eliminates
|
724
|
-
filesystem-specific variations (patch from Mike Lundy)
|
725
|
-
|
726
|
-
0.6 (28 April 2010)
|
727
|
-
|
728
|
-
- |:CommandT| now accepts an optional parameter to specify the starting
|
729
|
-
directory, temporarily overriding the usual default of Vim's |:pwd|
|
730
|
-
- fix truncated paths when operating from root directory
|
731
|
-
|
732
|
-
0.5.1 (11 April 2010)
|
733
|
-
|
734
|
-
- fix for Ruby 1.9 compatibility regression introduced in 0.5
|
735
|
-
- documentation enhancements, specifically targetted at Windows users
|
736
|
-
|
737
|
-
0.5 (3 April 2010)
|
738
|
-
|
739
|
-
- |:CommandTFlush| now re-evaluates settings, allowing changes made via |let|
|
740
|
-
to be picked up without having to restart Vim
|
741
|
-
- fix premature abort when scanning very deep directory hierarchies
|
742
|
-
- remove broken |<Esc>| key mapping on vt100 and xterm terminals
|
743
|
-
- provide settings for overriding default mappings
|
744
|
-
- minor performance optimization
|
745
|
-
|
746
|
-
0.4 (27 March 2010)
|
747
|
-
|
748
|
-
- add |g:CommandTMatchWindowAtTop| setting (patch from Zak Johnson)
|
749
|
-
- documentation fixes and enhancements
|
750
|
-
- internal refactoring and simplification
|
751
|
-
|
752
|
-
0.3 (24 March 2010)
|
753
|
-
|
754
|
-
- add |g:CommandTMaxHeight| setting for controlling the maximum height of the
|
755
|
-
match window (patch from Lucas de Vries)
|
756
|
-
- fix bug where |'list'| setting might be inappropriately set after dismissing
|
757
|
-
Command-T
|
758
|
-
- compatibility fix for different behaviour of "autoload" under Ruby 1.9.1
|
759
|
-
- avoid "highlight group not found" warning when run under a version of Vim
|
760
|
-
that does not have syntax highlighting support
|
761
|
-
- open in split when opening normally would fail due to |'hidden'| and
|
762
|
-
|'modified'| values
|
763
|
-
|
764
|
-
0.2 (23 March 2010)
|
765
|
-
|
766
|
-
- compatibility fixes for compilation under Ruby 1.9 series
|
767
|
-
- compatibility fixes for compilation under Ruby 1.8.5
|
768
|
-
- compatibility fixes for Windows and other non-UNIX platforms
|
769
|
-
- suppress "mapping already exists" message if <Leader>t mapping is already
|
770
|
-
defined when plug-in is loaded
|
771
|
-
- exclude paths based on |'wildignore'| setting rather than a hardcoded
|
772
|
-
regular expression
|
773
|
-
|
774
|
-
0.1 (22 March 2010)
|
775
|
-
|
776
|
-
- initial public release
|
777
|
-
|
778
|
-
------------------------------------------------------------------------------
|
779
|
-
vim:tw=78:ft=help:
|