command-t 1.11.4 → 1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.txt +128 -39
- data/Rakefile +2 -18
- data/doc/command-t.txt +128 -39
- data/doc/tags +6 -1
- data/plugin/command-t.vim +7 -10
- data/ruby/command-t.rb +17 -0
- data/ruby/command-t/Makefile +8 -8
- data/ruby/command-t/controller.rb +89 -22
- data/ruby/command-t/ext.bundle +0 -0
- data/ruby/command-t/finder.rb +8 -2
- data/ruby/command-t/finder/buffer_finder.rb +8 -10
- data/ruby/command-t/finder/file_finder.rb +22 -27
- data/ruby/command-t/finder/jump_finder.rb +8 -10
- data/ruby/command-t/finder/mru_buffer_finder.rb +20 -22
- data/ruby/command-t/finder/tag_finder.rb +18 -20
- data/ruby/command-t/match_window.rb +30 -13
- data/ruby/command-t/path_utilities.rb +17 -0
- data/ruby/command-t/prompt.rb +1 -1
- data/ruby/command-t/scanner.rb +7 -3
- data/ruby/command-t/scanner/buffer_scanner.rb +14 -15
- data/ruby/command-t/scanner/file_scanner.rb +75 -66
- data/ruby/command-t/scanner/file_scanner/file_limit_exceeded.rb +10 -0
- data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +38 -38
- data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +46 -26
- data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +43 -43
- data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +46 -46
- data/ruby/command-t/scanner/jump_scanner.rb +22 -23
- data/ruby/command-t/scanner/mru_buffer_scanner.rb +20 -21
- data/ruby/command-t/scanner/tag_scanner.rb +23 -23
- data/ruby/command-t/scm_utilities.rb +22 -0
- data/ruby/command-t/settings.rb +0 -2
- data/ruby/command-t/util.rb +1 -1
- data/ruby/command-t/vim.rb +3 -3
- data/ruby/command-t/watchman.c +0 -15
- metadata +6 -3
- data/ruby/command-t/vim/path_utilities.rb +0 -34
data/doc/tags
CHANGED
@@ -2,15 +2,16 @@
|
|
2
2
|
:CommandTBuffer command-t.txt /*:CommandTBuffer*
|
3
3
|
:CommandTFlush command-t.txt /*:CommandTFlush*
|
4
4
|
:CommandTJumps command-t.txt /*:CommandTJumps*
|
5
|
+
:CommandTLoad command-t.txt /*:CommandTLoad*
|
5
6
|
:CommandTMRU command-t.txt /*:CommandTMRU*
|
6
7
|
:CommandTTag command-t.txt /*:CommandTTag*
|
7
8
|
command-t command-t.txt /*command-t*
|
9
|
+
command-t-appstream command-t.txt /*command-t-appstream*
|
8
10
|
command-t-authors command-t.txt /*command-t-authors*
|
9
11
|
command-t-commands command-t.txt /*command-t-commands*
|
10
12
|
command-t-compile command-t.txt /*command-t-compile*
|
11
13
|
command-t-contents command-t.txt /*command-t-contents*
|
12
14
|
command-t-development command-t.txt /*command-t-development*
|
13
|
-
command-t-donations command-t.txt /*command-t-donations*
|
14
15
|
command-t-faq command-t.txt /*command-t-faq*
|
15
16
|
command-t-history command-t.txt /*command-t-history*
|
16
17
|
command-t-installation command-t.txt /*command-t-installation*
|
@@ -47,7 +48,9 @@ g:CommandTCursorLeftMap command-t.txt /*g:CommandTCursorLeftMap*
|
|
47
48
|
g:CommandTCursorRightMap command-t.txt /*g:CommandTCursorRightMap*
|
48
49
|
g:CommandTCursorStartMap command-t.txt /*g:CommandTCursorStartMap*
|
49
50
|
g:CommandTDeleteMap command-t.txt /*g:CommandTDeleteMap*
|
51
|
+
g:CommandTEncoding command-t.txt /*g:CommandTEncoding*
|
50
52
|
g:CommandTFileScanner command-t.txt /*g:CommandTFileScanner*
|
53
|
+
g:CommandTGitScanSubmodules command-t.txt /*g:CommandTGitScanSubmodules*
|
51
54
|
g:CommandTHighlightColor command-t.txt /*g:CommandTHighlightColor*
|
52
55
|
g:CommandTIgnoreCase command-t.txt /*g:CommandTIgnoreCase*
|
53
56
|
g:CommandTInputDebounce command-t.txt /*g:CommandTInputDebounce*
|
@@ -61,10 +64,12 @@ g:CommandTMinHeight command-t.txt /*g:CommandTMinHeight*
|
|
61
64
|
g:CommandTNeverShowDotFiles command-t.txt /*g:CommandTNeverShowDotFiles*
|
62
65
|
g:CommandTQuickfixMap command-t.txt /*g:CommandTQuickfixMap*
|
63
66
|
g:CommandTRefreshMap command-t.txt /*g:CommandTRefreshMap*
|
67
|
+
g:CommandTSCMDirectories command-t.txt /*g:CommandTSCMDirectories*
|
64
68
|
g:CommandTScanDotDirectories command-t.txt /*g:CommandTScanDotDirectories*
|
65
69
|
g:CommandTSelectNextMap command-t.txt /*g:CommandTSelectNextMap*
|
66
70
|
g:CommandTSelectPrevMap command-t.txt /*g:CommandTSelectPrevMap*
|
67
71
|
g:CommandTSmartCase command-t.txt /*g:CommandTSmartCase*
|
68
72
|
g:CommandTTagIncludeFilenames command-t.txt /*g:CommandTTagIncludeFilenames*
|
69
73
|
g:CommandTToggleFocusMap command-t.txt /*g:CommandTToggleFocusMap*
|
74
|
+
g:CommandTTraverseSCM command-t.txt /*g:CommandTTraverseSCM*
|
70
75
|
g:CommandTWildIgnore command-t.txt /*g:CommandTWildIgnore*
|
data/plugin/command-t.vim
CHANGED
@@ -6,12 +6,13 @@ if exists("g:command_t_loaded") || &cp
|
|
6
6
|
endif
|
7
7
|
let g:command_t_loaded = 1
|
8
8
|
|
9
|
-
command CommandTBuffer call commandt#CommandTShowBufferFinder()
|
10
|
-
command CommandTJump call commandt#CommandTShowJumpFinder()
|
11
|
-
command CommandTMRU call commandt#CommandTShowMRUFinder()
|
12
|
-
command CommandTTag call commandt#CommandTShowTagFinder()
|
13
|
-
command -nargs=? -complete=dir CommandT call commandt#CommandTShowFileFinder(<q-args>)
|
14
|
-
command CommandTFlush call commandt#CommandTFlush()
|
9
|
+
command! CommandTBuffer call commandt#CommandTShowBufferFinder()
|
10
|
+
command! CommandTJump call commandt#CommandTShowJumpFinder()
|
11
|
+
command! CommandTMRU call commandt#CommandTShowMRUFinder()
|
12
|
+
command! CommandTTag call commandt#CommandTShowTagFinder()
|
13
|
+
command! -nargs=? -complete=dir CommandT call commandt#CommandTShowFileFinder(<q-args>)
|
14
|
+
command! CommandTFlush call commandt#CommandTFlush()
|
15
|
+
command! CommandTLoad call commandt#CommandTLoad()
|
15
16
|
|
16
17
|
if !hasmapto(':CommandT<CR>') && maparg('<Leader>t', 'n') == ''
|
17
18
|
silent! nnoremap <unique> <silent> <Leader>t :CommandT<CR>
|
@@ -20,7 +21,3 @@ endif
|
|
20
21
|
if !hasmapto(':CommandTBuffer<CR>') && maparg('<Leader>b', 'n') == ''
|
21
22
|
silent! nnoremap <unique> <silent> <Leader>b :CommandTBuffer<CR>
|
22
23
|
endif
|
23
|
-
|
24
|
-
if !has('ruby')
|
25
|
-
finish
|
26
|
-
endif
|
data/ruby/command-t.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Copyright 2014 Greg Hurrell. All rights reserved.
|
2
|
+
# Licensed under the terms of the BSD 2-clause license.
|
3
|
+
|
4
|
+
module CommandT
|
5
|
+
autoload :Controller, 'command-t/controller'
|
6
|
+
autoload :Finder, 'command-t/finder'
|
7
|
+
autoload :MRU, 'command-t/mru'
|
8
|
+
autoload :MatchWindow, 'command-t/match_window'
|
9
|
+
autoload :PathUtilities, 'command-t/path_utilities'
|
10
|
+
autoload :Prompt, 'command-t/prompt'
|
11
|
+
autoload :SCMUtilities, 'command-t/scm_utilities'
|
12
|
+
autoload :Scanner, 'command-t/scanner'
|
13
|
+
autoload :Settings, 'command-t/settings'
|
14
|
+
autoload :Stub, 'command-t/stub'
|
15
|
+
autoload :Util, 'command-t/util'
|
16
|
+
autoload :VIM, 'command-t/vim'
|
17
|
+
end # module CommandT
|
data/ruby/command-t/Makefile
CHANGED
@@ -11,12 +11,12 @@ ECHO = $(ECHO1:0=@echo)
|
|
11
11
|
#### Start of system configuration section. ####
|
12
12
|
|
13
13
|
srcdir = .
|
14
|
-
topdir = /Users/glh/.rbenv/versions/2.0.0-
|
14
|
+
topdir = /Users/glh/.rbenv/versions/2.0.0-p481/include/ruby-2.0.0
|
15
15
|
hdrdir = $(topdir)
|
16
|
-
arch_hdrdir = /Users/glh/.rbenv/versions/2.0.0-
|
16
|
+
arch_hdrdir = /Users/glh/.rbenv/versions/2.0.0-p481/include/ruby-2.0.0/x86_64-darwin14.0.0
|
17
17
|
PATH_SEPARATOR = :
|
18
18
|
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
|
19
|
-
prefix = /Users/glh/.rbenv/versions/2.0.0-
|
19
|
+
prefix = /Users/glh/.rbenv/versions/2.0.0-p481
|
20
20
|
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
21
21
|
rubyarchprefix = $(rubylibprefix)/$(arch)
|
22
22
|
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
@@ -62,8 +62,8 @@ bindir = $(exec_prefix)/bin
|
|
62
62
|
archdir = $(rubyarchdir)
|
63
63
|
|
64
64
|
|
65
|
-
CC =
|
66
|
-
CXX =
|
65
|
+
CC = clang
|
66
|
+
CXX = clang++
|
67
67
|
LIBRUBY = $(LIBRUBY_A)
|
68
68
|
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
69
69
|
LIBRUBYARG_SHARED =
|
@@ -81,9 +81,9 @@ CCDLFLAGS = -fno-common
|
|
81
81
|
CFLAGS = $(CCDLFLAGS) -O3 -Wno-error=shorten-64-to-32 -pipe $(ARCH_FLAG)
|
82
82
|
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
83
83
|
DEFS = -DWATCHMAN_BUILD
|
84
|
-
CPPFLAGS = -DHAVE_FCNTL_H -DHAVE_STDINT_H -DHAVE_SYS_ERRNO_H -DHAVE_SYS_SOCKET_H -DHAVE_RUBY_ST_H -DHAVE_ST_H -I/Users/glh/.rbenv/versions/2.0.0-
|
84
|
+
CPPFLAGS = -DHAVE_FCNTL_H -DHAVE_STDINT_H -DHAVE_SYS_ERRNO_H -DHAVE_SYS_SOCKET_H -DHAVE_RUBY_ST_H -DHAVE_ST_H -I/Users/glh/.rbenv/versions/2.0.0-p481/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
|
85
85
|
CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
|
86
|
-
ldflags = -L. -L/Users/glh/.rbenv/versions/2.0.0-
|
86
|
+
ldflags = -L. -L/Users/glh/.rbenv/versions/2.0.0-p481/lib
|
87
87
|
dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress
|
88
88
|
ARCH_FLAG =
|
89
89
|
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
@@ -99,7 +99,7 @@ RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
|
99
99
|
RUBYW_BASE_NAME = rubyw
|
100
100
|
RUBY_BASE_NAME = ruby
|
101
101
|
|
102
|
-
arch = x86_64-
|
102
|
+
arch = x86_64-darwin14.0.0
|
103
103
|
sitearch = $(arch)
|
104
104
|
ruby_version = 2.0.0
|
105
105
|
ruby = $(bindir)/ruby
|
@@ -1,22 +1,65 @@
|
|
1
|
-
# Copyright 2010-
|
1
|
+
# Copyright 2010-2015 Greg Hurrell. All rights reserved.
|
2
2
|
# Licensed under the terms of the BSD 2-clause license.
|
3
3
|
|
4
|
-
require 'command-t/finder/buffer_finder'
|
5
|
-
require 'command-t/finder/jump_finder'
|
6
|
-
require 'command-t/finder/file_finder'
|
7
|
-
require 'command-t/finder/mru_buffer_finder'
|
8
|
-
require 'command-t/finder/tag_finder'
|
9
|
-
require 'command-t/match_window'
|
10
|
-
require 'command-t/prompt'
|
11
|
-
require 'command-t/vim/path_utilities'
|
12
|
-
require 'command-t/util'
|
13
|
-
|
14
4
|
module CommandT
|
15
5
|
class Controller
|
16
|
-
include
|
6
|
+
include PathUtilities
|
7
|
+
include SCMUtilities
|
8
|
+
|
9
|
+
# Wraps `method` in a `rescue` clause that attempts to print some useful
|
10
|
+
# information to the screen before re-raising any exception. Without this,
|
11
|
+
# most of the useful output is unhelpfully swallowed by Vim.
|
12
|
+
def self.guard(method)
|
13
|
+
class_eval <<-END
|
14
|
+
alias original_#{method} #{method}
|
15
|
+
def #{method}(*args, &block)
|
16
|
+
original_#{method}(*args, &block)
|
17
|
+
rescue Exception => e
|
18
|
+
backtrace = e.backtrace
|
19
|
+
trimmed = backtrace.take(backtrace.length - 2)
|
20
|
+
text = VIM::escape_for_single_quotes trimmed.join("\n")
|
21
|
+
::VIM::command "echo '\#{text}'"
|
22
|
+
raise e
|
23
|
+
end
|
24
|
+
END
|
25
|
+
end
|
17
26
|
|
18
27
|
def initialize
|
19
28
|
@prompt = Prompt.new
|
29
|
+
|
30
|
+
encoding = VIM::get_string('g:CommandTEncoding')
|
31
|
+
if encoding
|
32
|
+
begin
|
33
|
+
encoding = Encoding.find(encoding)
|
34
|
+
Encoding.default_external = encoding
|
35
|
+
Encoding.default_internal = encoding
|
36
|
+
rescue
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# For possible use in status lines.
|
42
|
+
def active_finder
|
43
|
+
@active_finder && @active_finder.class.name
|
44
|
+
end
|
45
|
+
|
46
|
+
# For possible use in status lines.
|
47
|
+
def path
|
48
|
+
@path
|
49
|
+
end
|
50
|
+
|
51
|
+
# For possible use in status lines.
|
52
|
+
def is_own_buffer(buffer_number)
|
53
|
+
@match_window && buffer_number == @match_window.buffer_number
|
54
|
+
end
|
55
|
+
|
56
|
+
# For possible use in status lines.
|
57
|
+
def return_is_own_buffer(buffer_number)
|
58
|
+
if is_own_buffer(buffer_number)
|
59
|
+
::VIM::command 'return 1'
|
60
|
+
else
|
61
|
+
::VIM::command 'return 0'
|
62
|
+
end
|
20
63
|
end
|
21
64
|
|
22
65
|
def show_buffer_finder
|
@@ -24,24 +67,28 @@ module CommandT
|
|
24
67
|
@active_finder = buffer_finder
|
25
68
|
show
|
26
69
|
end
|
70
|
+
guard :show_buffer_finder
|
27
71
|
|
28
72
|
def show_jump_finder
|
29
73
|
@path = VIM::pwd
|
30
74
|
@active_finder = jump_finder
|
31
75
|
show
|
32
76
|
end
|
77
|
+
guard :show_jump_finder
|
33
78
|
|
34
79
|
def show_mru_finder
|
35
80
|
@path = VIM::pwd
|
36
81
|
@active_finder = mru_finder
|
37
82
|
show
|
38
83
|
end
|
84
|
+
guard :show_mru_finder
|
39
85
|
|
40
86
|
def show_tag_finder
|
41
87
|
@path = VIM::pwd
|
42
88
|
@active_finder = tag_finder
|
43
89
|
show
|
44
90
|
end
|
91
|
+
guard :show_tag_finder
|
45
92
|
|
46
93
|
def show_file_finder
|
47
94
|
# optional parameter will be desired starting directory, or ""
|
@@ -68,6 +115,7 @@ module CommandT
|
|
68
115
|
# probably a problem with the optional parameter
|
69
116
|
@match_window.print_no_such_file_or_directory
|
70
117
|
end
|
118
|
+
guard :show_file_finder
|
71
119
|
|
72
120
|
def hide
|
73
121
|
@match_window.leave
|
@@ -93,12 +141,14 @@ module CommandT
|
|
93
141
|
::VIM::command 'call setqflist([' + matches + '])'
|
94
142
|
::VIM::command 'cope'
|
95
143
|
end
|
144
|
+
guard :quickfix
|
96
145
|
|
97
146
|
def refresh
|
98
147
|
return unless @active_finder && @active_finder.respond_to?(:flush)
|
99
148
|
@active_finder.flush
|
100
149
|
list_matches!
|
101
150
|
end
|
151
|
+
guard :refresh
|
102
152
|
|
103
153
|
def flush
|
104
154
|
@max_height = nil
|
@@ -106,6 +156,7 @@ module CommandT
|
|
106
156
|
@file_finder = nil
|
107
157
|
@tag_finder = nil
|
108
158
|
end
|
159
|
+
guard :flush
|
109
160
|
|
110
161
|
def handle_key
|
111
162
|
key = ::VIM::evaluate('a:arg').to_i.chr
|
@@ -116,6 +167,7 @@ module CommandT
|
|
116
167
|
@match_window.find key
|
117
168
|
end
|
118
169
|
end
|
170
|
+
guard :handle_key
|
119
171
|
|
120
172
|
def backspace
|
121
173
|
if @focus == @prompt
|
@@ -123,6 +175,7 @@ module CommandT
|
|
123
175
|
@needs_update = true
|
124
176
|
end
|
125
177
|
end
|
178
|
+
guard :backspace
|
126
179
|
|
127
180
|
def delete
|
128
181
|
if @focus == @prompt
|
@@ -130,56 +183,68 @@ module CommandT
|
|
130
183
|
@needs_update = true
|
131
184
|
end
|
132
185
|
end
|
186
|
+
guard :delete
|
133
187
|
|
134
188
|
def accept_selection(options = {})
|
135
189
|
selection = @match_window.selection
|
136
190
|
hide
|
137
191
|
open_selection(selection, options) unless selection.nil?
|
138
192
|
end
|
193
|
+
guard :accept_selection
|
139
194
|
|
140
195
|
def toggle_focus
|
141
196
|
@focus.unfocus # old focus
|
142
197
|
@focus = @focus == @prompt ? @match_window : @prompt
|
143
198
|
@focus.focus # new focus
|
144
199
|
end
|
200
|
+
guard :toggle_focus
|
145
201
|
|
146
202
|
def cancel
|
147
203
|
hide
|
148
204
|
end
|
205
|
+
guard :toggle_focus
|
149
206
|
|
150
207
|
def select_next
|
151
208
|
@match_window.select_next
|
152
209
|
end
|
210
|
+
guard :select_next
|
153
211
|
|
154
212
|
def select_prev
|
155
213
|
@match_window.select_prev
|
156
214
|
end
|
215
|
+
guard :select_prev
|
157
216
|
|
158
217
|
def clear
|
159
218
|
@prompt.clear!
|
160
219
|
list_matches!
|
161
220
|
end
|
221
|
+
guard :clear
|
162
222
|
|
163
223
|
def clear_prev_word
|
164
224
|
@prompt.clear_prev_word!
|
165
225
|
list_matches!
|
166
226
|
end
|
227
|
+
guard :clear_prev_word
|
167
228
|
|
168
229
|
def cursor_left
|
169
230
|
@prompt.cursor_left if @focus == @prompt
|
170
231
|
end
|
232
|
+
guard :cursor_left
|
171
233
|
|
172
234
|
def cursor_right
|
173
235
|
@prompt.cursor_right if @focus == @prompt
|
174
236
|
end
|
237
|
+
guard :cursor_right
|
175
238
|
|
176
239
|
def cursor_end
|
177
240
|
@prompt.cursor_end if @focus == @prompt
|
178
241
|
end
|
242
|
+
guard :cursor_end
|
179
243
|
|
180
244
|
def cursor_start
|
181
245
|
@prompt.cursor_start if @focus == @prompt
|
182
246
|
end
|
247
|
+
guard :cursor_start
|
183
248
|
|
184
249
|
def leave
|
185
250
|
@match_window.leave
|
@@ -202,6 +267,7 @@ module CommandT
|
|
202
267
|
|
203
268
|
@needs_update = false
|
204
269
|
end
|
270
|
+
guard :list_matches
|
205
271
|
|
206
272
|
def tab_command
|
207
273
|
VIM::get_string('g:CommandTAcceptSelectionTabCommand') || 'tabe'
|
@@ -220,7 +286,7 @@ module CommandT
|
|
220
286
|
def scm_markers
|
221
287
|
markers = VIM::get_string('g:CommandTSCMDirectories')
|
222
288
|
markers = markers && markers.split(/\s*,\s*/)
|
223
|
-
markers = %w[.git .hg .svn .bzr _darcs] unless markers && markers.
|
289
|
+
markers = %w[.git .hg .svn .bzr _darcs] unless markers && markers.any?
|
224
290
|
markers
|
225
291
|
end
|
226
292
|
|
@@ -380,7 +446,7 @@ module CommandT
|
|
380
446
|
end
|
381
447
|
else
|
382
448
|
Array(value).each do |mapping|
|
383
|
-
unless mapping == '<Esc>' && term =~ /\A(screen|xterm
|
449
|
+
unless mapping == '<Esc>' && term =~ /\A(rxvt|screen|vt100|xterm)/
|
384
450
|
map mapping, key
|
385
451
|
end
|
386
452
|
end
|
@@ -389,8 +455,8 @@ module CommandT
|
|
389
455
|
end
|
390
456
|
|
391
457
|
def set_up_autocmds
|
392
|
-
::VIM::command 'augroup
|
393
|
-
::VIM::command '
|
458
|
+
::VIM::command 'augroup CommandTController'
|
459
|
+
::VIM::command 'autocmd!'
|
394
460
|
::VIM::command 'autocmd CursorHold <buffer> :call CommandTListMatches()'
|
395
461
|
::VIM::command 'augroup END'
|
396
462
|
end
|
@@ -408,15 +474,15 @@ module CommandT
|
|
408
474
|
end
|
409
475
|
|
410
476
|
def buffer_finder
|
411
|
-
@buffer_finder ||= CommandT::BufferFinder.new
|
477
|
+
@buffer_finder ||= CommandT::Finder::BufferFinder.new
|
412
478
|
end
|
413
479
|
|
414
480
|
def mru_finder
|
415
|
-
@mru_finder ||= CommandT::MRUBufferFinder.new
|
481
|
+
@mru_finder ||= CommandT::Finder::MRUBufferFinder.new
|
416
482
|
end
|
417
483
|
|
418
484
|
def file_finder
|
419
|
-
@file_finder ||= CommandT::FileFinder.new nil,
|
485
|
+
@file_finder ||= CommandT::Finder::FileFinder.new nil,
|
420
486
|
:max_depth => VIM::get_number('g:CommandTMaxDepth'),
|
421
487
|
:max_files => VIM::get_number('g:CommandTMaxFiles'),
|
422
488
|
:max_caches => VIM::get_number('g:CommandTMaxCachedDirectories'),
|
@@ -424,15 +490,16 @@ module CommandT
|
|
424
490
|
:never_show_dot_files => VIM::get_bool('g:CommandTNeverShowDotFiles'),
|
425
491
|
:scan_dot_directories => VIM::get_bool('g:CommandTScanDotDirectories'),
|
426
492
|
:wild_ignore => VIM::get_string('g:CommandTWildIgnore'),
|
427
|
-
:scanner => VIM::get_string('g:CommandTFileScanner')
|
493
|
+
:scanner => VIM::get_string('g:CommandTFileScanner'),
|
494
|
+
:git_scan_submodules => VIM::get_bool('g:CommandTGitScanSubmodules')
|
428
495
|
end
|
429
496
|
|
430
497
|
def jump_finder
|
431
|
-
@jump_finder ||= CommandT::JumpFinder.new
|
498
|
+
@jump_finder ||= CommandT::Finder::JumpFinder.new
|
432
499
|
end
|
433
500
|
|
434
501
|
def tag_finder
|
435
|
-
@tag_finder ||= CommandT::TagFinder.new \
|
502
|
+
@tag_finder ||= CommandT::Finder::TagFinder.new \
|
436
503
|
:include_filenames => VIM::get_bool('g:CommandTTagIncludeFilenames')
|
437
504
|
end
|
438
505
|
end # class Controller
|
data/ruby/command-t/ext.bundle
CHANGED
Binary file
|
data/ruby/command-t/finder.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright 2010-2014 Greg Hurrell. All rights reserved.
|
2
2
|
# Licensed under the terms of the BSD 2-clause license.
|
3
3
|
|
4
|
-
require 'command-t/ext' # CommandT::Matcher
|
4
|
+
require 'command-t/ext' # CommandT::Matcher, CommandT::Watchman::Utils
|
5
5
|
|
6
6
|
module CommandT
|
7
7
|
# Encapsulates a Scanner instance (which builds up a list of available files
|
@@ -11,7 +11,13 @@ module CommandT
|
|
11
11
|
# Specialized subclasses use different kinds of scanners adapted for
|
12
12
|
# different kinds of search (files, buffers).
|
13
13
|
class Finder
|
14
|
-
|
14
|
+
autoload :BufferFinder, 'command-t/finder/buffer_finder'
|
15
|
+
autoload :FileFinder, 'command-t/finder/file_finder'
|
16
|
+
autoload :JumpFinder, 'command-t/finder/jump_finder'
|
17
|
+
autoload :MRUBufferFinder, 'command-t/finder/mru_buffer_finder'
|
18
|
+
autoload :TagFinder, 'command-t/finder/tag_finder'
|
19
|
+
|
20
|
+
include PathUtilities
|
15
21
|
|
16
22
|
def initialize(path = Dir.pwd, options = {})
|
17
23
|
raise RuntimeError, 'Subclass responsibility'
|