command-t 1.13 → 2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.txt +209 -67
  4. data/Rakefile +47 -57
  5. data/doc/command-t.txt +209 -67
  6. data/doc/tags +9 -0
  7. data/plugin/command-t.vim +22 -13
  8. data/ruby/command-t.rb +7 -2
  9. data/ruby/command-t/Makefile +32 -32
  10. data/ruby/command-t/controller.rb +33 -25
  11. data/ruby/command-t/depend +1 -1
  12. data/ruby/command-t/ext.bundle +0 -0
  13. data/ruby/command-t/ext.c +1 -1
  14. data/ruby/command-t/ext.h +1 -1
  15. data/ruby/command-t/extconf.rb +1 -1
  16. data/ruby/command-t/finder.rb +7 -1
  17. data/ruby/command-t/finder/buffer_finder.rb +5 -1
  18. data/ruby/command-t/finder/file_finder.rb +5 -1
  19. data/ruby/command-t/finder/jump_finder.rb +5 -1
  20. data/ruby/command-t/finder/mru_buffer_finder.rb +5 -1
  21. data/ruby/command-t/finder/tag_finder.rb +5 -1
  22. data/ruby/command-t/match.c +5 -2
  23. data/ruby/command-t/match.h +2 -1
  24. data/ruby/command-t/match_window.rb +36 -21
  25. data/ruby/command-t/matcher.c +12 -2
  26. data/ruby/command-t/matcher.h +1 -1
  27. data/ruby/command-t/metadata/fallback.rb +12 -0
  28. data/ruby/command-t/mru.rb +1 -1
  29. data/ruby/command-t/path_utilities.rb +1 -1
  30. data/ruby/command-t/prompt.rb +7 -6
  31. data/ruby/command-t/ruby_compat.h +1 -1
  32. data/ruby/command-t/scanner.rb +1 -1
  33. data/ruby/command-t/scanner/buffer_scanner.rb +1 -1
  34. data/ruby/command-t/scanner/file_scanner.rb +1 -4
  35. data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +1 -1
  36. data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +1 -1
  37. data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +3 -1
  38. data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +1 -1
  39. data/ruby/command-t/scanner/jump_scanner.rb +1 -1
  40. data/ruby/command-t/scanner/mru_buffer_scanner.rb +1 -1
  41. data/ruby/command-t/scanner/tag_scanner.rb +1 -1
  42. data/ruby/command-t/scm_utilities.rb +1 -1
  43. data/ruby/command-t/settings.rb +2 -1
  44. data/ruby/command-t/stub.rb +1 -1
  45. data/ruby/command-t/util.rb +1 -1
  46. data/ruby/command-t/vim.rb +3 -3
  47. data/ruby/command-t/vim/screen.rb +1 -1
  48. data/ruby/command-t/vim/window.rb +1 -1
  49. data/ruby/command-t/watchman.c +1 -1
  50. data/ruby/command-t/watchman.h +1 -1
  51. metadata +3 -4
  52. data/ruby/command-t/metadata.rb +0 -8
  53. data/ruby/command-t/scanner/file_scanner/file_limit_exceeded.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46092d285a715fa372926a9ba7a6c9c52fd3bd83
4
- data.tar.gz: 6cbb54f1c5e3be27a255812b04d82119bc179a21
3
+ metadata.gz: b9c92f460a44bb7554c990bf9d06c5f3b3ad8891
4
+ data.tar.gz: 27f3ef68e47d9621c0e4216ea8d6a10d435d0cab
5
5
  SHA512:
6
- metadata.gz: 370557a99ef3c9410797bf1abb003ede91f1e6c4177ea7ef811fcbf7c0ed4be846a6f0c01ea7125cce29aa7b8866dc9185e784b0ccce0a55277ae73c80ec3504
7
- data.tar.gz: a0d3d1e129b3de1620947edd09bf22baab78219484f180b933e4dbcd65351b70ff75c3c006abce461b7e92805a1ad9a257d4b15b07a7f7ffadd45b796ac2fd06
6
+ metadata.gz: f9f0e3ace3dc7a0d2b1d991f3f8173a8e1bf702714bd3fc03b2016f5ce6099f3fd9f5bc00b5900bbda169064c5c11ea612464de42ee84385ed8cbf309310b0af
7
+ data.tar.gz: fc06e1678ac22c9b5ea73ec90a9bba6919fc7a3954b42e4aee2fc911e0a4445589bf772abd2a23918fe5da27fd3f9544169104f142ed64f9f1505000dbb41679
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2010-2015 Greg Hurrell. All rights reserved.
1
+ Copyright 2010-present Greg Hurrell. All rights reserved.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without
4
4
  modification, are permitted provided that the following conditions are met:
data/README.txt CHANGED
@@ -2,21 +2,22 @@
2
2
 
3
3
  CONTENTS *command-t-contents*
4
4
 
5
- 1. Introduction |command-t-intro|
6
- 2. Requirements |command-t-requirements|
7
- 3. Installation |command-t-installation|
8
- 4. Trouble-shooting |command-t-trouble-shooting|
9
- 5. Usage |command-t-usage|
10
- 6. Commands |command-t-commands|
11
- 7. Mappings |command-t-mappings|
12
- 8. Options |command-t-options|
13
- 9. FAQ |command-t-faq|
14
- 10. Tips |command-t-tips|
15
- 11. Authors |command-t-authors|
16
- 12. Development |command-t-development|
17
- 13. Website |command-t-website|
18
- 14. License |command-t-license|
19
- 15. History |command-t-history|
5
+ 1. Introduction |command-t-intro|
6
+ 2. Requirements |command-t-requirements|
7
+ 3. Installation |command-t-installation|
8
+ 4. Trouble-shooting |command-t-trouble-shooting|
9
+ 5. Usage |command-t-usage|
10
+ 6. Commands |command-t-commands|
11
+ 7. Mappings |command-t-mappings|
12
+ 8. Options |command-t-options|
13
+ 9. Integration and Extensibility |command-t-integration-and-extensibility|
14
+ 10. FAQ |command-t-faq|
15
+ 11. Tips |command-t-tips|
16
+ 12. Authors |command-t-authors|
17
+ 13. Development |command-t-development|
18
+ 14. Website |command-t-website|
19
+ 15. License |command-t-license|
20
+ 16. History |command-t-history|
20
21
 
21
22
 
22
23
  INTRODUCTION *command-t-intro*
@@ -213,7 +214,7 @@ For more information about Pathogen, see:
213
214
  Obtaining the source using Vundle ~
214
215
 
215
216
  Anywhere between the calls to `vundle#begin` and `vundle#end` in your
216
- `~/.vimrc`, add a `Plugin` directive telling Vundle of your desire to use
217
+ |.vimrc|, add a `Plugin` directive telling Vundle of your desire to use
217
218
  Command-T:
218
219
 
219
220
  call vundle#begin()
@@ -231,7 +232,7 @@ For more information about Vundle, see:
231
232
  Obtaining the source using NeoBundle ~
232
233
 
233
234
  Anywhere between the calls to `neobundle#begin` and `neobundle#end` in your
234
- `~/.vimrc`, add a `NeoBundle` directive telling NeoBundle of your desire to use
235
+ |.vimrc|, add a `NeoBundle` directive telling NeoBundle of your desire to use
235
236
  Command-T:
236
237
 
237
238
  call neobundle#begin(expand('~/.vim/bundle/'))
@@ -247,7 +248,7 @@ For more information about NeoBundle, see:
247
248
  *command-t-vam*
248
249
  Obtaining the source using VAM ~
249
250
 
250
- After the call to `vam#ActivateAddons` in your `~/.vimrc`, add Command-T to
251
+ After the call to `vam#ActivateAddons` in your |.vimrc|, add Command-T to
251
252
  the `VAMActivate` call:
252
253
 
253
254
  call vam#ActivateAddons([])
@@ -483,7 +484,7 @@ The following is also available on terminals which support it:
483
484
  <Esc> cancel (dismisses file listing)
484
485
 
485
486
  Note that the default mappings can be overriden by setting options in your
486
- `~/.vimrc` file (see the OPTIONS section for a full list of available options).
487
+ |.vimrc| file (see the OPTIONS section for a full list of available options).
487
488
 
488
489
  In addition, when the file listing has focus, typing a character will cause
489
490
  the selection to jump to the first path which begins with that character.
@@ -550,26 +551,36 @@ COMMANDS *command-t-commands*
550
551
 
551
552
  MAPPINGS *command-t-mappings*
552
553
 
553
- By default Command-T comes with only two mappings:
554
+ By default Command-T comes with only three mappings:
554
555
 
555
- <Leader>t bring up the Command-T file window
556
- <Leader>b bring up the Command-T buffer window
556
+ *<Plug>(CommandT)*
557
557
 
558
- However, Command-T won't overwrite a pre-existing mapping so if you prefer
559
- to define different mappings use lines like these in your `~/.vimrc`:
558
+ <Leader>t bring up the Command-T file window
560
559
 
561
- nnoremap <silent> <Leader>t :CommandT<CR>
562
- nnoremap <silent> <Leader>b :CommandTBuffer<CR>
560
+ *<Plug>(CommandTBuffer)*
563
561
 
564
- Replacing "<Leader>t" or "<Leader>b" with your mapping of choice.
562
+ <Leader>b bring up the Command-T buffer window
563
+
564
+ *<Plug>(CommandTJump)*
565
+
566
+ <Leader>j bring up the Command-T jumplist window
567
+
568
+ Note that Command-T won't overwrite a pre-existing mapping so if you prefer
569
+ to define different mappings use lines like these in your |.vimrc|:
570
+
571
+ nnoremap <silent> <Leader>t <Plug>(CommandT)
572
+ nnoremap <silent> <Leader>b <Plug>(CommandTBuffer)
573
+ nnoremap <silent> <Leader>j <Plug>(CommandTJump)
574
+
575
+ Replacing "<Leader>t", "<Leader>b" or "<Leader>j" with your mapping of choice.
565
576
 
566
577
  Note that in the case of MacVim you actually can map to Command-T (written
567
- as <D-t> in Vim) in your `~/.gvimrc` file if you first unmap the existing menu
578
+ as <D-t> in Vim) in your |.gvimrc| file if you first unmap the existing menu
568
579
  binding of Command-T to "New Tab":
569
580
 
570
581
  if has("gui_macvim")
571
582
  macmenu &File.New\ Tab key=<nop>
572
- map <D-t> :CommandT<CR>
583
+ map <D-t> <Plug>(CommandT)
573
584
  endif
574
585
 
575
586
  When the Command-T window is active a number of other additional mappings
@@ -580,8 +591,8 @@ overriding the mappings are listed below under OPTIONS.
580
591
 
581
592
  OPTIONS *command-t-options*
582
593
 
583
- A number of options may be set in your `~/.vimrc` to influence the behaviour of
584
- the plug-in. To set an option, you include a line like this in your `~/.vimrc`:
594
+ A number of options may be set in your |.vimrc| to influence the behaviour of
595
+ the plug-in. To set an option, you include a line like this in your |.vimrc|:
585
596
 
586
597
  let g:CommandTMaxFiles=20000
587
598
 
@@ -769,10 +780,17 @@ Following is a list of all available options:
769
780
  When this setting is off (the default) the matches in the |:CommandTTag|
770
781
  listing do not include filenames.
771
782
 
783
+ *g:CommandTCursorColor*
784
+ string (default: 'Underlined')
785
+ |g:CommandTCursorColor|
786
+
787
+ Specifies the |:highlight| color that will be applied to the cursor in
788
+ the Command-T prompt.
789
+
772
790
  *g:CommandTHighlightColor*
773
791
  |g:CommandTHighlightColor| string (default: 'PmenuSel')
774
792
 
775
- Specifies the highlight color that will be used to show the currently
793
+ Specifies the |:highlight| color that will be used to show the currently
776
794
  selected item in the match listing window.
777
795
 
778
796
  *g:CommandTWildIgnore*
@@ -792,6 +810,14 @@ Following is a list of all available options:
792
810
  Ignore case when searching. Defaults to on, which means that searching
793
811
  is case-insensitive by default. See also |g:CommandTSmartCase|.
794
812
 
813
+ *g:CommandTRecursiveMatch*
814
+ |g:CommandTRecursiveMatch| boolean (default: 1)
815
+
816
+ Use this to downgrade Command-T's match-scoring algorithm to its older,
817
+ non-recursive form. Doing so may improve the responsiveness of the match
818
+ listing, but at the cost of slightly less precision in the ranking of
819
+ results.
820
+
795
821
  *g:CommandTSmartCase*
796
822
  |g:CommandTSmartCase| boolean (default: none)
797
823
 
@@ -865,10 +891,17 @@ Following is a list of all available options:
865
891
  environment ends up defaulting to an undesired encoding, such as
866
892
  "ASCII-8BIT".
867
893
 
894
+ *g:CommandTIgnoreSpaces*
895
+ |g:CommandTIgnoreSpaces| boolean (default: 0)
896
+
897
+ When typing a search term into Command-T, use this option to have it
898
+ ignore spaces. Without this option set, it will search for literal
899
+ spaces inside file names.
900
+
868
901
  As well as the basic options listed above, there are a number of settings that
869
902
  can be used to override the default key mappings used by Command-T. For
870
903
  example, to set <C-x> as the mapping for cancelling (dismissing) the Command-T
871
- window, you would add the following to your `~/.vimrc`:
904
+ window, you would add the following to your |.vimrc|:
872
905
 
873
906
  let g:CommandTCancelMap='<C-x>'
874
907
 
@@ -992,6 +1025,53 @@ settings can be used to control behavior:
992
1025
  'wildignore' at all.
993
1026
 
994
1027
 
1028
+ INTEGRATION AND EXTENSIBILITY *command-t-integration-and-extensibility*
1029
+
1030
+ For the purposes of integrating with other plug-ins, or otherwise extending
1031
+ Command-T's functionality, a number of hooks and features are provided. Note
1032
+ that making use of any of these extension points is considered to be advanced
1033
+ configuration, and the more invasive the modifications, the greater the risk
1034
+ that they will interact poorly with future versions of Command-T. Proceed with
1035
+ caution.
1036
+
1037
+ *command-t-filetype*
1038
+ command-t filetype ~
1039
+
1040
+ Command-T displays its match listing using a special Vim buffer with a
1041
+ filetype of `command-t`. This can be used in |ftplugins| or elsewhere to set up
1042
+ an |autocommand| or apply custom configuration.
1043
+
1044
+ For example of an |ftplugin| that sets a custom 'statusline' for the
1045
+ Command-T match listing buffer, see: https://wt.pe/f
1046
+
1047
+ *command-t-load*
1048
+ *commandt#Load*
1049
+ Eager loading with commandt#CommandTLoad ~
1050
+
1051
+ In order to minimize Vim startup time, most of Command-T's functionality is
1052
+ only loaded on first use, via Vim's |autoload| mechanism.
1053
+
1054
+ If you should wish to monkey patch some Command-T functionality, the
1055
+ `commandt#Load()` function (also exposed via the |:CommandTLoad| command) is
1056
+ provided as a means of eager-loading Command-T's code, so that you can go
1057
+ ahead and patch it.
1058
+
1059
+ *commandt#ActiveFinder*
1060
+ *commandt#CheckBuffer*
1061
+ *commandt#Path*
1062
+ Statusline hooks ~
1063
+
1064
+ A number of methods are provided that may be useful for creating a
1065
+ context-sensitive 'statusline'.
1066
+
1067
+ - `commandt#ActiveFinder()`: Returns the class name of the currently
1068
+ active finder.
1069
+ - `commandt#Path()`: Returns the path that Command-T is currently
1070
+ searching.
1071
+ - `commandt#CheckBuffer()`: Takes a buffer number and returns true if
1072
+ it is the Command-T match listing buffer.
1073
+
1074
+
995
1075
  FAQ *command-t-faq*
996
1076
 
997
1077
  Why does my build fail with "unknown argument -multiply_definedsuppress"? ~
@@ -1035,7 +1115,7 @@ Why doesn't the Escape key close the match listing in terminal Vim? ~
1035
1115
 
1036
1116
  In some terminals such as xterm the Escape key misbehaves, so Command-T
1037
1117
  doesn't set up a mapping for it. If you want to try using the escape key
1038
- anyway, you can add something like the following to your `~/.vimrc` file:
1118
+ anyway, you can add something like the following to your |.vimrc| file:
1039
1119
 
1040
1120
  if &term =~ "xterm" || &term =~ "screen"
1041
1121
  let g:CommandTCancelMap = ['<ESC>', '<C-c>']
@@ -1119,17 +1199,25 @@ anchored at the root level of your repository in any case.
1119
1199
  Command-T will internally cache up to 10 different directories, so even if you
1120
1200
  |cd| repeatedly, it should only need to scan each directory once.
1121
1201
 
1202
+ It's advisable to keep a long-running Vim instance in place and let it cache
1203
+ the directory listings rather than repeatedly closing and re-opening Vim in
1204
+ order to edit every file. On those occasions when you do need to flush the
1205
+ cache (ie. with |CommandTFlush| or <C-f> in the match listing window), use of
1206
+ the Watchman scanner should make the delay barely noticeable.
1207
+
1122
1208
  let g:CommandTSmartCase = 1
1123
1209
 
1124
1210
  Makes Command-T perform case-sensitive matching whenever the search pattern
1125
1211
  includes an uppercase letter. This allows you to narrow the search results
1126
1212
  listing with fewer keystrokes. See also |g:CommandTIgnoreCase|.
1127
1213
 
1128
- It's advisable to keep a long-running Vim instance in place and let it cache
1129
- the directory listings rather than repeatedly closing and re-opening Vim in
1130
- order to edit every file. On those occasions when you do need to flush the
1131
- cache (ie. with |CommandTFlush| or <C-f> in the match listing window), use of
1132
- the Watchman scanner should make the delay barely noticeable.
1214
+ let g:CommandTRecursiveMatch = 0
1215
+
1216
+ This one is a little more subjective. You may want to turn off Command-T's
1217
+ recursive match-scoring algorithm to save some cycles. This finds matches more
1218
+ quickly at the possible cost of ranking them slightly less precisely. Whether
1219
+ applying this setting helps or hurts you in a very large repo is probably
1220
+ repo-dependent.
1133
1221
 
1134
1222
  As noted in the introduction, Command-T works best when you adopt a
1135
1223
  "path-centric" mentality. This is especially true on very large hierarchies.
@@ -1154,6 +1242,7 @@ kind of ongoing calibration will come quite naturally.
1154
1242
  Finally, it is important to be on a relatively recent version of Command-T to
1155
1243
  fully benefit from the available performance enhancements:
1156
1244
 
1245
+ - version 2.0a (not yet released) added the |g:CommandTRecursiveMatch| option
1157
1246
  - version 1.10 (July 2014) added the |g:CommandTIgnoreCase| and
1158
1247
  |g:CommandTSmartCase| options
1159
1248
  - version 1.9 (May 2014) tweaked memoization algorithm for a 10% speed boost
@@ -1174,31 +1263,32 @@ Command-T is written and maintained by Greg Hurrell <greg@hurrell.net>.
1174
1263
  Other contributors that have submitted patches include (in alphabetical
1175
1264
  order):
1176
1265
 
1177
- Abhinav Gupta Noon Silk
1178
- Aleksandrs Ļedovskis Ole Petter Bang
1179
- Andy Waite Patrick Hayes
1180
- Anthony Panozzo Paul Jolly
1181
- Artem Nezvigin Pavel Sergeev
1182
- Ben Boeckel Rainux Luo
1183
- Ben Osheroff Richard Feldman
1184
- Daniel Hahler Roland Puntaier
1185
- David Szotten Ross Lagerwall
1186
- Emily Strickland Scott Bronson
1187
- Felix Tjandrawibawa Seth Fowler
1188
- Gary Bernhardt Sherzod Gapirov
1189
- Ivan Ukhov Shlomi Fish
1190
- Jacek Wysocki Steven Moazami
1191
- Jeff Kreeftmeijer Sung Pae
1192
- Kevin Webster Thomas Pelletier
1193
- Lucas de Vries Ton van den Heuvel
1194
- Marcus Brito Victor Hugo Borja
1195
- Marian Schubert Vlad Seghete
1196
- Matthew Todd Vít Ondruch
1197
- Mike Lundy Woody Peterson
1198
- Nadav Samet Yan Pritzker
1199
- Nate Kane Yiding Jia
1200
- Nicholas Alpi Zak Johnson
1201
- Nikolai Aleksandrovich Pavlov
1266
+ Abhinav Gupta Nikolai Aleksandrovich Pavlov
1267
+ Aleksandrs Ļedovskis Noon Silk
1268
+ Andy Waite Ole Petter Bang
1269
+ Anthony Panozzo Patrick Hayes
1270
+ Artem Nezvigin Paul Jolly
1271
+ Ben Boeckel Pavel Sergeev
1272
+ Ben Osheroff Rainux Luo
1273
+ Daniel Hahler Richard Feldman
1274
+ David Szotten Roland Puntaier
1275
+ Emily Strickland Ross Lagerwall
1276
+ Felix Tjandrawibawa Scott Bronson
1277
+ Gary Bernhardt Seth Fowler
1278
+ Ivan Ukhov Sherzod Gapirov
1279
+ Jacek Wysocki Shlomi Fish
1280
+ Jeff Kreeftmeijer Steven Moazami
1281
+ Jerome Castaneda Sung Pae
1282
+ KJ Tsanaktsidis Thomas Pelletier
1283
+ Kevin Webster Ton van den Heuvel
1284
+ Lucas de Vries Victor Hugo Borja
1285
+ Marcus Brito Vlad Seghete
1286
+ Marian Schubert Vít Ondruch
1287
+ Matthew Todd Woody Peterson
1288
+ Mike Lundy Yan Pritzker
1289
+ Nadav Samet Yiding Jia
1290
+ Nate Kane Zak Johnson
1291
+ Nicholas Alpi
1202
1292
 
1203
1293
  As this was the first Vim plug-in I had ever written I was heavily influenced
1204
1294
  by the design of the LustyExplorer plug-in by Stephen Bach, which I understand
@@ -1266,7 +1356,7 @@ Bug reports should be submitted to the issue tracker at:
1266
1356
 
1267
1357
  LICENSE *command-t-license*
1268
1358
 
1269
- Copyright 2010-2015 Greg Hurrell. All rights reserved.
1359
+ Copyright 2010-present Greg Hurrell. All rights reserved.
1270
1360
 
1271
1361
  Redistribution and use in source and binary forms, with or without
1272
1362
  modification, are permitted provided that the following conditions are met:
@@ -1291,6 +1381,58 @@ POSSIBILITY OF SUCH DAMAGE.
1291
1381
 
1292
1382
  HISTORY *command-t-history*
1293
1383
 
1384
+ 2.0 (28 December 2015)
1385
+
1386
+ - add |:CommandTIgnoreSpaces| option (patch from KJ Tsanaktsidis)
1387
+ - make Command-T resilient to people deleting its hidden, unlisted buffer
1388
+ - the match listing buffer now has filetype "command-t", which may be useful
1389
+ for detectability/extensibility
1390
+ - Command-T now sets the name of the match listing buffer according to how it
1391
+ was invoked (ie. for the file finder, the name is "Command-T [Files]", for
1392
+ the buffer finder, the name is "Command-T [Buffers]", and so on);
1393
+ previously the name was a fixed as "GoToFile" regardless of the active
1394
+ finder type
1395
+ - Many internal function names have changed, so if you or your plug-ins are
1396
+ calling those internals they will need to be updated:
1397
+ - `commandt#CommandTFlush()` is now `commandt#Flush()`
1398
+ - `commandt#CommandTLoad()` is now `commandt#Load()`
1399
+ - `commandt#CommandTShowBufferFinder()` is now `commandt#BufferFinder()`
1400
+ - `commandt#CommandTShowFileFinder()` is now `commandt#FileFinder()`
1401
+ - `commandt#CommandTShowJumpFinder()` is now `commandt#JumpFinder()`
1402
+ - `commandt#CommandTShowMRUFinder()` is now `commandt#MRUFinder()`
1403
+ - `commandt#CommandTShowTagFinder()` is now `commandt#TagFinder()`
1404
+ - A number of functions have been turned into "private" autoloaded functions,
1405
+ to make it clear that they are intended only for internal use:
1406
+ - `CommandTAcceptSelection()` is now `commandt#private#AcceptSelection()`
1407
+ - `CommandTAcceptSelectionSplit()` is now `commandt#private#AcceptSelectionSplit()`
1408
+ - `CommandTAcceptSelectionTab()` is now `commandt#private#AcceptSelectionTab()`
1409
+ - `CommandTAcceptSelectionVSplit()` is now `commandt#private#AcceptSelectionVSplit()`
1410
+ - `CommandTBackspace()` is now `commandt#private#Backspace()`
1411
+ - `CommandTCancel()` is now `commandt#private#Cancel()`
1412
+ - `CommandTClear()` is now `commandt#private#Clear()`
1413
+ - `CommandTClearPrevWord()` is now `commandt#private#ClearPrevWord()`
1414
+ - `CommandTCursorEnd()` is now `commandt#private#CursorEnd()`
1415
+ - `CommandTCursorLeft()` is now `commandt#private#CursorLeft()`
1416
+ - `CommandTCursorRight()` is now `commandt#private#CursorRight()`
1417
+ - `CommandTCursorStart()` is now `commandt#private#CursorStart()`
1418
+ - `CommandTDelete()` is now `commandt#private#Delete()`
1419
+ - `CommandTHandleKey()` is now `commandt#private#HandleKey()`
1420
+ - `CommandTListMatches()` is now `commandt#private#ListMatches()`
1421
+ - `CommandTQuickfix()` is now `commandt#private#Quickfix()`
1422
+ - `CommandTRefresh()` is now `commandt#private#Refresh()`
1423
+ - `CommandTSelectNext()` is now `commandt#private#SelectNext()`
1424
+ - `CommandTSelectPrev()` is now `commandt#private#SelectPrev()`
1425
+ - `CommandTToggleFocus()` is now `commandt#private#ToggleFocus()`
1426
+ - add |g:CommandTRecursiveMatch| option
1427
+ - stop distribution as a vimball in favor of a zip archive
1428
+ - don't clobber |alternate-file| name when opening Command-T match listing
1429
+ (patch from Jerome Castaneda)
1430
+ - add |g:CommandTCursorColor| option
1431
+ - expose mappings for |:CommandT| and |:CommandTBuffer| using `<Plug>`
1432
+ mappings |<Plug>(CommandT)| and |<Plug>(CommandT)|
1433
+ - add `<Leader>j` mapping to |:CommandTJump|, via |<Plug>(CommandTJump)|
1434
+ (defined only if no pre-existing mapping exists)
1435
+
1294
1436
  1.13 (29 April 2015)
1295
1437
 
1296
1438
  - avoid "W10: Warning: Changing a readonly file" when starting Vim in
@@ -1372,7 +1514,7 @@ HISTORY *command-t-history*
1372
1514
 
1373
1515
  1.9.1 (30 May 2014)
1374
1516
 
1375
- - include the file in the release vimball archive that was missing from the
1517
+ - include the file in the release archive that was missing from the
1376
1518
  1.9 release
1377
1519
 
1378
1520
  1.9 (25 May 2014)
@@ -1591,4 +1733,4 @@ HISTORY *command-t-history*
1591
1733
  - initial public release
1592
1734
 
1593
1735
  ------------------------------------------------------------------------------
1594
- vim:tw=78:ft=help:
1736
+ vim:ts=8:tw=78:ft=help:
data/Rakefile CHANGED
@@ -38,43 +38,6 @@ def err(str)
38
38
  puts "#{red}error: #{str}#{clear}"
39
39
  end
40
40
 
41
- def prepare_release_notes
42
- # extract base release notes from README.txt HISTORY section
43
- File.open('.release-notes.txt', 'w') do |out|
44
- lines = File.readlines('README.txt').each { |line| line.chomp! }
45
- while line = lines.shift do
46
- next unless line =~ /^HISTORY +\*command-t-history\*$/
47
- break unless lines.shift == '' &&
48
- (line = lines.shift) && line =~ /^\d\.\d/ &&
49
- lines.shift == ''
50
- while line = lines.shift && line != ''
51
- out.puts line
52
- end
53
- break
54
- end
55
- out.puts ''
56
- out.puts '# Please edit the release notes to taste.'
57
- out.puts '# Blank lines and lines beginning with a hash will be removed.'
58
- out.puts '# To abort, exit your editor with a non-zero exit status (:cquit in Vim).'
59
- end
60
-
61
- unless system "$EDITOR .release-notes.txt"
62
- err "editor exited with non-zero exit status; aborting"
63
- exit 1
64
- end
65
-
66
- filtered = read_release_notes
67
- File.open('.release-notes.txt', 'w') do |out|
68
- out.print filtered
69
- end
70
- end
71
-
72
- def read_release_notes
73
- File.readlines('.release-notes.txt').reject do |line|
74
- line =~ /^(#.*|\s*)$/ # filter comment lines and blank lines
75
- end.join
76
- end
77
-
78
41
  task :default => :spec
79
42
 
80
43
  desc 'Print help on preparing a release'
@@ -100,11 +63,10 @@ task :spec do
100
63
  bail_on_failure
101
64
  end
102
65
 
103
- desc 'Create vimball archive'
104
- task :vimball => :check_tag do
105
- system 'make'
66
+ desc 'Create archive'
67
+ task :archive => :check_tag do
68
+ system "git archive -o command-t-#{version}.zip HEAD -- ."
106
69
  bail_on_failure
107
- FileUtils.cp 'command-t.vba', "command-t-#{version}.vba"
108
70
  end
109
71
 
110
72
  desc 'Clean compiled products'
@@ -115,11 +77,6 @@ task :clean do
115
77
  end
116
78
  end
117
79
 
118
- desc 'Clobber all generated files'
119
- task :clobber => :clean do
120
- system 'make clean'
121
- end
122
-
123
80
  desc 'Compile extension'
124
81
  task :make do
125
82
  Dir.chdir 'ruby/command-t' do
@@ -139,32 +96,65 @@ task :check_tag do
139
96
  end
140
97
 
141
98
  desc 'Run checks prior to release'
142
- task :prerelease => ['make', 'spec', :vimball, :check_tag]
99
+ task :prerelease => ['make', 'spec', :archive, :check_tag]
100
+
101
+ desc 'Prepare release notes from HISTORY'
102
+ task :notes do
103
+ File.open('.release-notes.txt', 'w') do |out|
104
+ lines = File.readlines('doc/command-t.txt').each(&:chomp!)
105
+ while line = lines.shift do
106
+ next unless line =~ /^HISTORY +\*command-t-history\*$/
107
+ break unless lines.shift == '' &&
108
+ (line = lines.shift) && line =~ /^\d\.\d/ &&
109
+ lines.shift == ''
110
+ while (line = lines.shift) && line != ''
111
+ out.puts line
112
+ end
113
+ break
114
+ end
115
+ out.puts ''
116
+ out.puts '# Please edit the release notes to taste.'
117
+ out.puts '# Blank lines and lines beginning with a hash will be removed.'
118
+ out.puts '# To abort, exit your editor with a non-zero exit status (:cquit in Vim).'
119
+ end
120
+
121
+ unless system "$EDITOR .release-notes.txt"
122
+ err "editor exited with non-zero exit status; aborting"
123
+ exit 1
124
+ end
125
+
126
+ filtered = File.readlines('.release-notes.txt').reject do |line|
127
+ line =~ /^(#.*|\s*)$/ # filter comment lines and blank lines
128
+ end.join
129
+
130
+ File.open('.release-notes.txt', 'w') do |out|
131
+ out.print filtered
132
+ end
133
+ end
143
134
 
144
135
  namespace :upload do
145
- desc 'Upload current vimball to Amazon S3'
146
- task :s3 => :vimball do
136
+ desc 'Upload current archive to Amazon S3'
137
+ task :s3 => :archive do
147
138
  sh 'aws --curl-options=--insecure put ' +
148
- "s3.wincent.com/command-t/releases/command-t-#{version}.vba " +
149
- "command-t-#{version}.vba"
139
+ "s3.wincent.com/command-t/releases/command-t-#{version}.zip " +
140
+ "command-t-#{version}.zip"
150
141
  sh 'aws --curl-options=--insecure put ' +
151
- "s3.wincent.com/command-t/releases/command-t-#{version}.vba?acl " +
142
+ "s3.wincent.com/command-t/releases/command-t-#{version}.zip?acl " +
152
143
  '--public'
153
144
  end
154
145
 
155
- desc 'Upload current vimball to www.vim.org'
156
- task :vim => :vimball do
157
- prepare_release_notes
146
+ desc 'Upload current archive to www.vim.org'
147
+ task :vim => [:archive, :notes] do
158
148
  sh "vendor/vimscriptuploader/vimscriptuploader.rb \
159
149
  --id 3025 \
160
- --file command-t-#{version}.vba \
150
+ --file command-t-#{version}.zip \
161
151
  --message-file .release-notes.txt \
162
152
  --version #{version} \
163
153
  --config ~/.vim_org.yml \
164
154
  .vim_org.yml"
165
155
  end
166
156
 
167
- desc 'Upload current vimball everywhere'
157
+ desc 'Upload current archive everywhere'
168
158
  task :all => [ :s3, :vim ]
169
159
  end
170
160