command-t 1.11 → 1.11.1
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/README.txt +53 -12
- data/Rakefile +2 -2
- data/doc/command-t.txt +53 -12
- data/ruby/command-t/controller.rb +34 -56
- data/ruby/command-t/ext.bundle +0 -0
- data/ruby/command-t/extconf.rb +1 -0
- data/ruby/command-t/finder.rb +4 -4
- data/ruby/command-t/finder/mru_buffer_finder.rb +8 -8
- data/ruby/command-t/finder/tag_finder.rb +2 -2
- data/ruby/command-t/match.c +8 -19
- data/ruby/command-t/match_window.rb +15 -15
- data/ruby/command-t/mru.rb +5 -0
- data/ruby/command-t/prompt.rb +18 -18
- data/ruby/command-t/scanner/buffer_scanner.rb +0 -1
- data/ruby/command-t/scanner/file_scanner.rb +30 -16
- data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +29 -36
- data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +18 -25
- data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +12 -17
- data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +29 -35
- data/ruby/command-t/scanner/jump_scanner.rb +1 -2
- data/ruby/command-t/scanner/tag_scanner.rb +1 -2
- data/ruby/command-t/settings.rb +5 -15
- data/ruby/command-t/stub.rb +3 -2
- data/ruby/command-t/vim.rb +53 -29
- data/ruby/command-t/vim/path_utilities.rb +1 -1
- data/ruby/command-t/vim/screen.rb +4 -2
- data/ruby/command-t/vim/window.rb +11 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90e1677bd5292b9f4953505a0441d0e82f8c93c0
|
4
|
+
data.tar.gz: eee2671da9e31c05f2bdf091427c273ea706b940
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff4cd01ca300a6344a22b5619a967726805509bd8c046272b535d790b571784ee17eb69eb18c7cd7ac38e03d22ef6d0f1919529ba5570213b986f244fe30aa4e
|
7
|
+
data.tar.gz: 45862ab7a28dc0ec6c85d2885f2f426d212d37eaab5c7914a522139d6b52d393dfad0d00785ef43ff637375f532e7cd9fc7982d3a448a5eaec03fd586cdb74d1
|
data/README.txt
CHANGED
@@ -108,6 +108,10 @@ by looking at the output of:
|
|
108
108
|
|
109
109
|
:ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
|
110
110
|
|
111
|
+
Or, for very old versions of Ruby which don't define `RUBY_PATCHLEVEL`:
|
112
|
+
|
113
|
+
:ruby puts RUBY_VERSION
|
114
|
+
|
111
115
|
A suitable Ruby environment for Windows can be installed using the Ruby
|
112
116
|
1.8.7-p299 RubyInstaller available at:
|
113
117
|
|
@@ -357,6 +361,10 @@ issuing this command:
|
|
357
361
|
|
358
362
|
:ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
|
359
363
|
|
364
|
+
Or, for very old versions of Ruby which don't define `RUBY_PATCHLEVEL`:
|
365
|
+
|
366
|
+
:ruby puts RUBY_VERSION
|
367
|
+
|
360
368
|
Finally, beware that if you change your installation method for Command-T (for
|
361
369
|
example, switching from one plugin manager to another) you should verify that
|
362
370
|
you remove all of the files installed by the previous installation method; if
|
@@ -884,10 +892,10 @@ settings can be used to control behavior:
|
|
884
892
|
Vim's |'wildignore'| setting is used to determine which files should be
|
885
893
|
excluded from listings. This is a comma-separated list of glob patterns.
|
886
894
|
It defaults to the empty string, but common settings include "*.o,*.obj"
|
887
|
-
(to exclude object files) or "
|
888
|
-
directories). For example:
|
895
|
+
(to exclude object files) or "**/.git/*,**/.svn/*" (to exclude SCM
|
896
|
+
metadata directories). For example:
|
889
897
|
|
890
|
-
:set wildignore+=*.o,*.obj
|
898
|
+
:set wildignore+=*.o,*.obj
|
891
899
|
|
892
900
|
A pattern such as "vendor/rails/**" would exclude all files and
|
893
901
|
subdirectories inside the "vendor/rails" directory (relative to
|
@@ -900,6 +908,30 @@ settings can be used to control behavior:
|
|
900
908
|
|g:CommandTWildIgnore| setting to apply an override that takes effect
|
901
909
|
only during Command-T searches.
|
902
910
|
|
911
|
+
Note that there are some differences among file scanners
|
912
|
+
(see |g:CommandTFileScanner|) with respect to 'wildignore' handling:
|
913
|
+
|
914
|
+
- The default "ruby" scanner explores the filesystem recursively using a
|
915
|
+
depth-first search, and any directory (or subdirectory) which matches
|
916
|
+
the 'wildignore' pattern is not explored. So, if your 'wildignore'
|
917
|
+
contains "node_modules" then that entire sub-hierarchy will be
|
918
|
+
ignored. Additionally, wildcard patterns like "node_modules/**" or
|
919
|
+
"**/node_modules/*" will cause the entire sub-hierarchy to be ignored.
|
920
|
+
|
921
|
+
- The "git" and "find" scanners apply 'wildignore' filtering only after
|
922
|
+
completing their scans. Filtering only applies to files and not
|
923
|
+
directories. This means that in the "node_modules" example case, the
|
924
|
+
"node_modules" directory is not considered itself, and when we examine
|
925
|
+
a file like "node_modules/foo/bar" the "node_modules" pattern does
|
926
|
+
not match it (because "bar" does not match it). To exclude
|
927
|
+
any "node_modules" directory anywhere in the hierarchy and all of its
|
928
|
+
descendants we must use a pattern like "**/node_modules/*". To do this
|
929
|
+
only for a top-level "node_modules", use "node_modules/**".
|
930
|
+
|
931
|
+
- The "watchman" scanner is intended for use with massive hierarchies
|
932
|
+
where speed is of the utmost import, so it doesn't consult
|
933
|
+
'wildignore' at all.
|
934
|
+
|
903
935
|
|
904
936
|
FAQ *command-t-faq*
|
905
937
|
|
@@ -1075,21 +1107,21 @@ Command-T is written and maintained by Greg Hurrell <greg@hurrell.net>.
|
|
1075
1107
|
Other contributors that have submitted patches include (in alphabetical
|
1076
1108
|
order):
|
1077
1109
|
|
1078
|
-
Abhinav Gupta
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1110
|
+
Abhinav Gupta Lucas de Vries Roland Puntaier
|
1111
|
+
Aleksandrs Ļedovskis Marcus Brito Ross Lagerwall
|
1112
|
+
Andy Waite Marian Schubert Scott Bronson
|
1113
|
+
Anthony Panozzo Matthew Todd Seth Fowler
|
1114
|
+
Artem Nezvigin Mike Lundy Shlomi Fish
|
1115
|
+
Ben Osheroff Nadav Samet Steven Moazami
|
1116
|
+
Daniel Hahler Nate Kane Sung Pae
|
1117
|
+
David Szotten Nicholas Alpi Thomas Pelletier
|
1118
|
+
Emily Strickland Noon Silk Ton van den Heuvel
|
1085
1119
|
Felix Tjandrawibawa Ole Petter Bang Victor Hugo Borja
|
1086
1120
|
Gary Bernhardt Patrick Hayes Vít Ondruch
|
1087
1121
|
Ivan Ukhov Paul Jolly Woody Peterson
|
1088
1122
|
Jacek Wysocki Pavel Sergeev Yan Pritzker
|
1089
1123
|
Jeff Kreeftmeijer Rainux Luo Yiding Jia
|
1090
1124
|
Kevin Webster Richard Feldman Zak Johnson
|
1091
|
-
Lucas de Vries Roland Puntaier
|
1092
|
-
Marcus Brito Ross Lagerwall
|
1093
1125
|
|
1094
1126
|
As this was the first Vim plug-in I had ever written I was heavily influenced
|
1095
1127
|
by the design of the LustyExplorer plug-in by Stephen Bach, which I understand
|
@@ -1183,6 +1215,15 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
1183
1215
|
|
1184
1216
|
HISTORY *command-t-history*
|
1185
1217
|
|
1218
|
+
1.11.1 (29 August 2014)
|
1219
|
+
|
1220
|
+
- compatibility fixes with Ruby 1.8.6 (patch from Emily Strickland)
|
1221
|
+
- compatibility fixes with Ruby 1.8.5
|
1222
|
+
- fix 'wildignore' being ignored (bug present since 1.11)
|
1223
|
+
- fix current working directory being ignored when |g:CommandTTraverseSCM| is
|
1224
|
+
set to "pwd" (bug present since 1.11)
|
1225
|
+
- performance improvements
|
1226
|
+
|
1186
1227
|
1.11 (15 August 2014)
|
1187
1228
|
|
1188
1229
|
- improve edge-case handling in match results window code (patches from
|
data/Rakefile
CHANGED
data/doc/command-t.txt
CHANGED
@@ -108,6 +108,10 @@ by looking at the output of:
|
|
108
108
|
|
109
109
|
:ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
|
110
110
|
|
111
|
+
Or, for very old versions of Ruby which don't define `RUBY_PATCHLEVEL`:
|
112
|
+
|
113
|
+
:ruby puts RUBY_VERSION
|
114
|
+
|
111
115
|
A suitable Ruby environment for Windows can be installed using the Ruby
|
112
116
|
1.8.7-p299 RubyInstaller available at:
|
113
117
|
|
@@ -357,6 +361,10 @@ issuing this command:
|
|
357
361
|
|
358
362
|
:ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
|
359
363
|
|
364
|
+
Or, for very old versions of Ruby which don't define `RUBY_PATCHLEVEL`:
|
365
|
+
|
366
|
+
:ruby puts RUBY_VERSION
|
367
|
+
|
360
368
|
Finally, beware that if you change your installation method for Command-T (for
|
361
369
|
example, switching from one plugin manager to another) you should verify that
|
362
370
|
you remove all of the files installed by the previous installation method; if
|
@@ -884,10 +892,10 @@ settings can be used to control behavior:
|
|
884
892
|
Vim's |'wildignore'| setting is used to determine which files should be
|
885
893
|
excluded from listings. This is a comma-separated list of glob patterns.
|
886
894
|
It defaults to the empty string, but common settings include "*.o,*.obj"
|
887
|
-
(to exclude object files) or "
|
888
|
-
directories). For example:
|
895
|
+
(to exclude object files) or "**/.git/*,**/.svn/*" (to exclude SCM
|
896
|
+
metadata directories). For example:
|
889
897
|
|
890
|
-
:set wildignore+=*.o,*.obj
|
898
|
+
:set wildignore+=*.o,*.obj
|
891
899
|
|
892
900
|
A pattern such as "vendor/rails/**" would exclude all files and
|
893
901
|
subdirectories inside the "vendor/rails" directory (relative to
|
@@ -900,6 +908,30 @@ settings can be used to control behavior:
|
|
900
908
|
|g:CommandTWildIgnore| setting to apply an override that takes effect
|
901
909
|
only during Command-T searches.
|
902
910
|
|
911
|
+
Note that there are some differences among file scanners
|
912
|
+
(see |g:CommandTFileScanner|) with respect to 'wildignore' handling:
|
913
|
+
|
914
|
+
- The default "ruby" scanner explores the filesystem recursively using a
|
915
|
+
depth-first search, and any directory (or subdirectory) which matches
|
916
|
+
the 'wildignore' pattern is not explored. So, if your 'wildignore'
|
917
|
+
contains "node_modules" then that entire sub-hierarchy will be
|
918
|
+
ignored. Additionally, wildcard patterns like "node_modules/**" or
|
919
|
+
"**/node_modules/*" will cause the entire sub-hierarchy to be ignored.
|
920
|
+
|
921
|
+
- The "git" and "find" scanners apply 'wildignore' filtering only after
|
922
|
+
completing their scans. Filtering only applies to files and not
|
923
|
+
directories. This means that in the "node_modules" example case, the
|
924
|
+
"node_modules" directory is not considered itself, and when we examine
|
925
|
+
a file like "node_modules/foo/bar" the "node_modules" pattern does
|
926
|
+
not match it (because "bar" does not match it). To exclude
|
927
|
+
any "node_modules" directory anywhere in the hierarchy and all of its
|
928
|
+
descendants we must use a pattern like "**/node_modules/*". To do this
|
929
|
+
only for a top-level "node_modules", use "node_modules/**".
|
930
|
+
|
931
|
+
- The "watchman" scanner is intended for use with massive hierarchies
|
932
|
+
where speed is of the utmost import, so it doesn't consult
|
933
|
+
'wildignore' at all.
|
934
|
+
|
903
935
|
|
904
936
|
FAQ *command-t-faq*
|
905
937
|
|
@@ -1075,21 +1107,21 @@ Command-T is written and maintained by Greg Hurrell <greg@hurrell.net>.
|
|
1075
1107
|
Other contributors that have submitted patches include (in alphabetical
|
1076
1108
|
order):
|
1077
1109
|
|
1078
|
-
Abhinav Gupta
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1110
|
+
Abhinav Gupta Lucas de Vries Roland Puntaier
|
1111
|
+
Aleksandrs Ļedovskis Marcus Brito Ross Lagerwall
|
1112
|
+
Andy Waite Marian Schubert Scott Bronson
|
1113
|
+
Anthony Panozzo Matthew Todd Seth Fowler
|
1114
|
+
Artem Nezvigin Mike Lundy Shlomi Fish
|
1115
|
+
Ben Osheroff Nadav Samet Steven Moazami
|
1116
|
+
Daniel Hahler Nate Kane Sung Pae
|
1117
|
+
David Szotten Nicholas Alpi Thomas Pelletier
|
1118
|
+
Emily Strickland Noon Silk Ton van den Heuvel
|
1085
1119
|
Felix Tjandrawibawa Ole Petter Bang Victor Hugo Borja
|
1086
1120
|
Gary Bernhardt Patrick Hayes Vít Ondruch
|
1087
1121
|
Ivan Ukhov Paul Jolly Woody Peterson
|
1088
1122
|
Jacek Wysocki Pavel Sergeev Yan Pritzker
|
1089
1123
|
Jeff Kreeftmeijer Rainux Luo Yiding Jia
|
1090
1124
|
Kevin Webster Richard Feldman Zak Johnson
|
1091
|
-
Lucas de Vries Roland Puntaier
|
1092
|
-
Marcus Brito Ross Lagerwall
|
1093
1125
|
|
1094
1126
|
As this was the first Vim plug-in I had ever written I was heavily influenced
|
1095
1127
|
by the design of the LustyExplorer plug-in by Stephen Bach, which I understand
|
@@ -1183,6 +1215,15 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
1183
1215
|
|
1184
1216
|
HISTORY *command-t-history*
|
1185
1217
|
|
1218
|
+
1.11.1 (29 August 2014)
|
1219
|
+
|
1220
|
+
- compatibility fixes with Ruby 1.8.6 (patch from Emily Strickland)
|
1221
|
+
- compatibility fixes with Ruby 1.8.5
|
1222
|
+
- fix 'wildignore' being ignored (bug present since 1.11)
|
1223
|
+
- fix current working directory being ignored when |g:CommandTTraverseSCM| is
|
1224
|
+
set to "pwd" (bug present since 1.11)
|
1225
|
+
- performance improvements
|
1226
|
+
|
1186
1227
|
1.11 (15 August 2014)
|
1187
1228
|
|
1188
1229
|
- improve edge-case handling in match results window code (patches from
|
@@ -50,16 +50,17 @@ module CommandT
|
|
50
50
|
if arg && arg.size > 0
|
51
51
|
@path = File.expand_path(arg, VIM::pwd)
|
52
52
|
else
|
53
|
-
traverse = get_string('g:CommandTTraverseSCM') || 'file'
|
53
|
+
traverse = VIM::get_string('g:CommandTTraverseSCM') || 'file'
|
54
54
|
case traverse
|
55
55
|
when 'file'
|
56
56
|
@path = nearest_ancestor(VIM::current_file_dir, scm_markers)
|
57
57
|
when 'dir'
|
58
58
|
@path = nearest_ancestor(VIM::pwd, scm_markers)
|
59
|
+
else
|
60
|
+
@path = VIM::pwd
|
59
61
|
end
|
60
62
|
end
|
61
63
|
|
62
|
-
@path = VIM::pwd unless @path
|
63
64
|
@active_finder = file_finder
|
64
65
|
file_finder.path = @path
|
65
66
|
show
|
@@ -130,7 +131,7 @@ module CommandT
|
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
133
|
-
def accept_selection
|
134
|
+
def accept_selection(options = {})
|
134
135
|
selection = @match_window.selection
|
135
136
|
hide
|
136
137
|
open_selection(selection, options) unless selection.nil?
|
@@ -203,21 +204,21 @@ module CommandT
|
|
203
204
|
end
|
204
205
|
|
205
206
|
def tab_command
|
206
|
-
get_string('g:CommandTAcceptSelectionTabCommand') || 'tabe'
|
207
|
+
VIM::get_string('g:CommandTAcceptSelectionTabCommand') || 'tabe'
|
207
208
|
end
|
208
209
|
|
209
210
|
def split_command
|
210
|
-
get_string('g:CommandTAcceptSelectionSplitCommand') || 'sp'
|
211
|
+
VIM::get_string('g:CommandTAcceptSelectionSplitCommand') || 'sp'
|
211
212
|
end
|
212
213
|
|
213
214
|
def vsplit_command
|
214
|
-
get_string('g:CommandTAcceptSelectionVSplitCommand') || 'vs'
|
215
|
+
VIM::get_string('g:CommandTAcceptSelectionVSplitCommand') || 'vs'
|
215
216
|
end
|
216
217
|
|
217
218
|
private
|
218
219
|
|
219
220
|
def scm_markers
|
220
|
-
markers = get_string('g:CommandTSCMDirectories')
|
221
|
+
markers = VIM::get_string('g:CommandTSCMDirectories')
|
221
222
|
markers = markers && markers.split(/\s*,\s*/)
|
222
223
|
markers = %w[.git .hg .svn .bzr _darcs] unless markers && markers.length
|
223
224
|
markers
|
@@ -231,11 +232,11 @@ module CommandT
|
|
231
232
|
@initial_window = $curwin
|
232
233
|
@initial_buffer = $curbuf
|
233
234
|
@match_window = MatchWindow.new \
|
234
|
-
:highlight_color => get_string('g:CommandTHighlightColor'),
|
235
|
-
:match_window_at_top => get_bool('g:CommandTMatchWindowAtTop'),
|
236
|
-
:match_window_reverse => get_bool('g:CommandTMatchWindowReverse'),
|
235
|
+
:highlight_color => VIM::get_string('g:CommandTHighlightColor'),
|
236
|
+
:match_window_at_top => VIM::get_bool('g:CommandTMatchWindowAtTop'),
|
237
|
+
:match_window_reverse => VIM::get_bool('g:CommandTMatchWindowReverse'),
|
237
238
|
:min_height => min_height,
|
238
|
-
:debounce_interval => get_number('g:CommandTInputDebounce'
|
239
|
+
:debounce_interval => VIM::get_number('g:CommandTInputDebounce') || 50,
|
239
240
|
:prompt => @prompt
|
240
241
|
@focus = @prompt
|
241
242
|
@prompt.focus
|
@@ -245,12 +246,12 @@ module CommandT
|
|
245
246
|
end
|
246
247
|
|
247
248
|
def max_height
|
248
|
-
@max_height ||= get_number('g:CommandTMaxHeight'
|
249
|
+
@max_height ||= VIM::get_number('g:CommandTMaxHeight') || 0
|
249
250
|
end
|
250
251
|
|
251
252
|
def min_height
|
252
253
|
@min_height ||= begin
|
253
|
-
min_height = get_number('g:CommandTMinHeight'
|
254
|
+
min_height = VIM::get_number('g:CommandTMinHeight') || 0
|
254
255
|
min_height = max_height if max_height != 0 && min_height > max_height
|
255
256
|
min_height
|
256
257
|
end
|
@@ -259,9 +260,9 @@ module CommandT
|
|
259
260
|
def case_sensitive?
|
260
261
|
if @prompt.abbrev.match(/[A-Z]/)
|
261
262
|
if VIM::exists?('g:CommandTSmartCase')
|
262
|
-
smart_case = get_bool('g:CommandTSmartCase')
|
263
|
+
smart_case = VIM::get_bool('g:CommandTSmartCase')
|
263
264
|
else
|
264
|
-
smart_case = get_bool('&smartcase')
|
265
|
+
smart_case = VIM::get_bool('&smartcase')
|
265
266
|
end
|
266
267
|
|
267
268
|
if smart_case
|
@@ -270,47 +271,24 @@ module CommandT
|
|
270
271
|
end
|
271
272
|
|
272
273
|
if VIM::exists?('g:CommandTIgnoreCase')
|
273
|
-
return !get_bool('g:CommandTIgnoreCase')
|
274
|
+
return !VIM::get_bool('g:CommandTIgnoreCase')
|
274
275
|
end
|
275
276
|
|
276
277
|
false
|
277
278
|
end
|
278
279
|
|
279
|
-
def get_number(name, default = nil)
|
280
|
-
VIM::exists?(name) ? ::VIM::evaluate("#{name}").to_i : default
|
281
|
-
end
|
282
|
-
|
283
|
-
def get_bool(name)
|
284
|
-
VIM::exists?(name) ? ::VIM::evaluate("#{name}").to_i != 0 : nil
|
285
|
-
end
|
286
|
-
|
287
|
-
def get_string(name)
|
288
|
-
VIM::exists?(name) ? ::VIM::evaluate("#{name}").to_s : nil
|
289
|
-
end
|
290
|
-
|
291
|
-
# expect a string or a list of strings
|
292
|
-
def get_list_or_string name
|
293
|
-
return nil unless VIM::exists?(name)
|
294
|
-
list_or_string = ::VIM::evaluate("#{name}")
|
295
|
-
if list_or_string.kind_of?(Array)
|
296
|
-
list_or_string.map { |item| item.to_s }
|
297
|
-
else
|
298
|
-
list_or_string.to_s
|
299
|
-
end
|
300
|
-
end
|
301
|
-
|
302
280
|
# Backslash-escape space, \, |, %, #, "
|
303
|
-
def sanitize_path_string
|
281
|
+
def sanitize_path_string(str)
|
304
282
|
# for details on escaping command-line mode arguments see: :h :
|
305
283
|
# (that is, help on ":") in the Vim documentation.
|
306
284
|
str.gsub(/[ \\|%#"]/, '\\\\\0')
|
307
285
|
end
|
308
286
|
|
309
287
|
def default_open_command
|
310
|
-
if !get_bool('&modified') ||
|
311
|
-
get_bool('&hidden') ||
|
312
|
-
get_bool('&autowriteall') && !get_bool('&readonly')
|
313
|
-
get_string('g:CommandTAcceptSelectionCommand') || 'e'
|
288
|
+
if !VIM::get_bool('&modified') ||
|
289
|
+
VIM::get_bool('&hidden') ||
|
290
|
+
VIM::get_bool('&autowriteall') && !VIM::get_bool('&readonly')
|
291
|
+
VIM::get_string('g:CommandTAcceptSelectionCommand') || 'e'
|
314
292
|
else
|
315
293
|
'sp'
|
316
294
|
end
|
@@ -336,7 +314,7 @@ module CommandT
|
|
336
314
|
end
|
337
315
|
end
|
338
316
|
|
339
|
-
def open_selection
|
317
|
+
def open_selection(selection, options = {})
|
340
318
|
command = options[:command] || default_open_command
|
341
319
|
selection = File.expand_path selection, @path
|
342
320
|
selection = relative_path_under_working_directory selection
|
@@ -347,7 +325,7 @@ module CommandT
|
|
347
325
|
@active_finder.open_selection command, selection, options
|
348
326
|
end
|
349
327
|
|
350
|
-
def map
|
328
|
+
def map(key, function, param = nil)
|
351
329
|
::VIM::command "noremap <silent> <buffer> #{key} " \
|
352
330
|
":call CommandT#{function}(#{param})<CR>"
|
353
331
|
end
|
@@ -387,7 +365,7 @@ module CommandT
|
|
387
365
|
'SelectPrev' => ['<C-p>', '<C-k>', '<Up>'],
|
388
366
|
'ToggleFocus' => '<Tab>',
|
389
367
|
}.each do |key, value|
|
390
|
-
if override = get_list_or_string("g:CommandT#{key}Map")
|
368
|
+
if override = VIM::get_list_or_string("g:CommandT#{key}Map")
|
391
369
|
Array(override).each do |mapping|
|
392
370
|
map mapping, key
|
393
371
|
end
|
@@ -430,14 +408,14 @@ module CommandT
|
|
430
408
|
|
431
409
|
def file_finder
|
432
410
|
@file_finder ||= CommandT::FileFinder.new nil,
|
433
|
-
:max_depth => get_number('g:CommandTMaxDepth'),
|
434
|
-
:max_files => get_number('g:CommandTMaxFiles'),
|
435
|
-
:max_caches => get_number('g:CommandTMaxCachedDirectories'),
|
436
|
-
:always_show_dot_files => get_bool('g:CommandTAlwaysShowDotFiles'),
|
437
|
-
:never_show_dot_files => get_bool('g:CommandTNeverShowDotFiles'),
|
438
|
-
:scan_dot_directories => get_bool('g:CommandTScanDotDirectories'),
|
439
|
-
:wild_ignore => get_string('g:CommandTWildIgnore'),
|
440
|
-
:scanner => get_string('g:CommandTFileScanner')
|
411
|
+
:max_depth => VIM::get_number('g:CommandTMaxDepth'),
|
412
|
+
:max_files => VIM::get_number('g:CommandTMaxFiles'),
|
413
|
+
:max_caches => VIM::get_number('g:CommandTMaxCachedDirectories'),
|
414
|
+
:always_show_dot_files => VIM::get_bool('g:CommandTAlwaysShowDotFiles'),
|
415
|
+
:never_show_dot_files => VIM::get_bool('g:CommandTNeverShowDotFiles'),
|
416
|
+
:scan_dot_directories => VIM::get_bool('g:CommandTScanDotDirectories'),
|
417
|
+
:wild_ignore => VIM::get_string('g:CommandTWildIgnore'),
|
418
|
+
:scanner => VIM::get_string('g:CommandTFileScanner')
|
441
419
|
end
|
442
420
|
|
443
421
|
def jump_finder
|
@@ -446,7 +424,7 @@ module CommandT
|
|
446
424
|
|
447
425
|
def tag_finder
|
448
426
|
@tag_finder ||= CommandT::TagFinder.new \
|
449
|
-
:include_filenames => get_bool('g:CommandTTagIncludeFilenames')
|
427
|
+
:include_filenames => VIM::get_bool('g:CommandTTagIncludeFilenames')
|
450
428
|
end
|
451
429
|
end # class Controller
|
452
430
|
end # module CommandT
|