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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.txt +128 -39
  4. data/Rakefile +2 -18
  5. data/doc/command-t.txt +128 -39
  6. data/doc/tags +6 -1
  7. data/plugin/command-t.vim +7 -10
  8. data/ruby/command-t.rb +17 -0
  9. data/ruby/command-t/Makefile +8 -8
  10. data/ruby/command-t/controller.rb +89 -22
  11. data/ruby/command-t/ext.bundle +0 -0
  12. data/ruby/command-t/finder.rb +8 -2
  13. data/ruby/command-t/finder/buffer_finder.rb +8 -10
  14. data/ruby/command-t/finder/file_finder.rb +22 -27
  15. data/ruby/command-t/finder/jump_finder.rb +8 -10
  16. data/ruby/command-t/finder/mru_buffer_finder.rb +20 -22
  17. data/ruby/command-t/finder/tag_finder.rb +18 -20
  18. data/ruby/command-t/match_window.rb +30 -13
  19. data/ruby/command-t/path_utilities.rb +17 -0
  20. data/ruby/command-t/prompt.rb +1 -1
  21. data/ruby/command-t/scanner.rb +7 -3
  22. data/ruby/command-t/scanner/buffer_scanner.rb +14 -15
  23. data/ruby/command-t/scanner/file_scanner.rb +75 -66
  24. data/ruby/command-t/scanner/file_scanner/file_limit_exceeded.rb +10 -0
  25. data/ruby/command-t/scanner/file_scanner/find_file_scanner.rb +38 -38
  26. data/ruby/command-t/scanner/file_scanner/git_file_scanner.rb +46 -26
  27. data/ruby/command-t/scanner/file_scanner/ruby_file_scanner.rb +43 -43
  28. data/ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb +46 -46
  29. data/ruby/command-t/scanner/jump_scanner.rb +22 -23
  30. data/ruby/command-t/scanner/mru_buffer_scanner.rb +20 -21
  31. data/ruby/command-t/scanner/tag_scanner.rb +23 -23
  32. data/ruby/command-t/scm_utilities.rb +22 -0
  33. data/ruby/command-t/settings.rb +0 -2
  34. data/ruby/command-t/util.rb +1 -1
  35. data/ruby/command-t/vim.rb +3 -3
  36. data/ruby/command-t/watchman.c +0 -15
  37. metadata +6 -3
  38. data/ruby/command-t/vim/path_utilities.rb +0 -34
@@ -1,15 +1,13 @@
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
5
- require 'command-t/scanner/buffer_scanner'
6
- require 'command-t/finder'
7
-
8
4
  module CommandT
9
- class BufferFinder < Finder
10
- def initialize
11
- @scanner = BufferScanner.new
12
- @matcher = Matcher.new @scanner, :always_show_dot_files => true
13
- end
14
- end # class BufferFinder
5
+ class Finder
6
+ class BufferFinder < Finder
7
+ def initialize
8
+ @scanner = Scanner::BufferScanner.new
9
+ @matcher = Matcher.new @scanner, :always_show_dot_files => true
10
+ end
11
+ end # class BufferFinder
12
+ end # class Finder
15
13
  end # CommandT
@@ -1,34 +1,29 @@
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
5
- require 'command-t/finder'
6
- require 'command-t/scanner/file_scanner/ruby_file_scanner'
7
- require 'command-t/scanner/file_scanner/find_file_scanner'
8
- require 'command-t/scanner/file_scanner/watchman_file_scanner'
9
- require 'command-t/scanner/file_scanner/git_file_scanner'
10
-
11
4
  module CommandT
12
- class FileFinder < Finder
13
- def initialize(path = Dir.pwd, options = {})
14
- case options.delete(:scanner)
15
- when 'ruby', nil # ruby is the default
16
- @scanner = FileScanner::RubyFileScanner.new(path, options)
17
- when 'find'
18
- @scanner = FileScanner::FindFileScanner.new(path, options)
19
- when 'watchman'
20
- @scanner = FileScanner::WatchmanFileScanner.new(path, options)
21
- when 'git'
22
- @scanner = FileScanner::GitFileScanner.new(path, options)
23
- else
24
- raise ArgumentError, "unknown scanner type '#{options[:scanner]}'"
25
- end
5
+ class Finder
6
+ class FileFinder < Finder
7
+ def initialize(path = Dir.pwd, options = {})
8
+ case options.delete(:scanner)
9
+ when 'ruby', nil # ruby is the default
10
+ @scanner = Scanner::FileScanner::RubyFileScanner.new(path, options)
11
+ when 'find'
12
+ @scanner = Scanner::FileScanner::FindFileScanner.new(path, options)
13
+ when 'watchman'
14
+ @scanner = Scanner::FileScanner::WatchmanFileScanner.new(path, options)
15
+ when 'git'
16
+ @scanner = Scanner::FileScanner::GitFileScanner.new(path, options)
17
+ else
18
+ raise ArgumentError, "unknown scanner type '#{options[:scanner]}'"
19
+ end
26
20
 
27
- @matcher = Matcher.new @scanner, options
28
- end
21
+ @matcher = Matcher.new @scanner, options
22
+ end
29
23
 
30
- def flush
31
- @scanner.flush
32
- end
33
- end # class FileFinder
24
+ def flush
25
+ @scanner.flush
26
+ end
27
+ end # class FileFinder
28
+ end # class Finder
34
29
  end # module CommandT
@@ -1,15 +1,13 @@
1
1
  # Copyright 2011-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
5
- require 'command-t/scanner/jump_scanner'
6
- require 'command-t/finder'
7
-
8
4
  module CommandT
9
- class JumpFinder < Finder
10
- def initialize
11
- @scanner = JumpScanner.new
12
- @matcher = Matcher.new @scanner, :always_show_dot_files => true
13
- end
14
- end # class JumpFinder
5
+ class Finder
6
+ class JumpFinder < Finder
7
+ def initialize
8
+ @scanner = Scanner::JumpScanner.new
9
+ @matcher = Matcher.new @scanner, :always_show_dot_files => true
10
+ end
11
+ end # class JumpFinder
12
+ end # class Finder
15
13
  end # module CommandT
@@ -1,30 +1,28 @@
1
1
  # Copyright 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
5
- require 'command-t/scanner/mru_buffer_scanner'
6
- require 'command-t/finder/buffer_finder'
7
-
8
4
  module CommandT
9
- class MRUBufferFinder < BufferFinder
10
- def initialize
11
- @scanner = MRUBufferScanner.new
12
- @matcher = Matcher.new @scanner, :always_show_dot_files => true
13
- end
5
+ class Finder
6
+ class MRUBufferFinder < BufferFinder
7
+ def initialize
8
+ @scanner = Scanner::MRUBufferScanner.new
9
+ @matcher = Matcher.new @scanner, :always_show_dot_files => true
10
+ end
14
11
 
15
- # Override sorted_matches_for to prevent MRU ordered matches from being
16
- # ordered alphabetically.
17
- def sorted_matches_for(str, options = {})
18
- matches = super(str, options.merge(:sort => false))
12
+ # Override sorted_matches_for to prevent MRU ordered matches from being
13
+ # ordered alphabetically.
14
+ def sorted_matches_for(str, options = {})
15
+ matches = super(str, options.merge(:sort => false))
19
16
 
20
- # take current buffer (by definition, the most recently used) and move it
21
- # to the end of the results
22
- if MRU.last &&
23
- relative_path_under_working_directory(MRU.last.name) == matches.first
24
- matches[1..-1] + [matches.first]
25
- else
26
- matches
17
+ # take current buffer (by definition, the most recently used) and move it
18
+ # to the end of the results
19
+ if MRU.last &&
20
+ relative_path_under_working_directory(MRU.last.name) == matches.first
21
+ matches[1..-1] + [matches.first]
22
+ else
23
+ matches
24
+ end
27
25
  end
28
- end
29
- end # class MRUBufferFinder
26
+ end # class MRUBufferFinder
27
+ end # class Finder
30
28
  end # CommandT
@@ -1,28 +1,26 @@
1
1
  # Copyright 2011-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
5
- require 'command-t/scanner/tag_scanner'
6
- require 'command-t/finder'
7
-
8
4
  module CommandT
9
- class TagFinder < Finder
10
- def initialize(options = {})
11
- @scanner = TagScanner.new options
12
- @matcher = Matcher.new @scanner, :always_show_dot_files => true
13
- end
14
-
15
- def open_selection(command, selection, options = {})
16
- if @scanner.include_filenames
17
- selection = selection[0, selection.index(':')]
5
+ class Finder
6
+ class TagFinder < Finder
7
+ def initialize(options = {})
8
+ @scanner = Scanner::TagScanner.new options
9
+ @matcher = Matcher.new @scanner, :always_show_dot_files => true
18
10
  end
19
11
 
20
- # open the tag and center the screen on it
21
- ::VIM::command "silent! tag #{selection} | :normal zz"
22
- end
12
+ def open_selection(command, selection, options = {})
13
+ if @scanner.include_filenames
14
+ selection = selection[0, selection.index(':')]
15
+ end
23
16
 
24
- def flush
25
- @scanner.flush
26
- end
27
- end # class TagFinder
17
+ # open the tag and center the screen on it
18
+ ::VIM::command "silent! tag #{selection} | :normal zz"
19
+ end
20
+
21
+ def flush
22
+ @scanner.flush
23
+ end
24
+ end # class TagFinder
25
+ end # class Finder
28
26
  end # module CommandT
@@ -1,8 +1,7 @@
1
- # Copyright 2010-2014 Greg Hurrell. All rights reserved.
1
+ # Copyright 2010-2015 Greg Hurrell. All rights reserved.
2
2
  # Licensed under the terms of the BSD 2-clause license.
3
3
 
4
4
  require 'ostruct'
5
- require 'command-t/settings'
6
5
 
7
6
  module CommandT
8
7
  class MatchWindow
@@ -13,6 +12,8 @@ module CommandT
13
12
  MH_END = '</commandt>'
14
13
  @@buffer = nil
15
14
 
15
+ Highlight = Struct.new(:highlight, :bang)
16
+
16
17
  def initialize(options = {})
17
18
  @highlight_color = options[:highlight_color] || 'PmenuSel'
18
19
  @min_height = options[:min_height]
@@ -102,15 +103,21 @@ module CommandT
102
103
  # perform cleanup using an autocmd to ensure we don't get caught out
103
104
  # by some unexpected means of dismissing or leaving the Command-T window
104
105
  # (eg. <C-W q>, <C-W k> etc)
105
- ::VIM::command 'autocmd! * <buffer>'
106
+ ::VIM::command 'augroup CommandTMatchWindow'
107
+ ::VIM::command 'autocmd!'
106
108
  ::VIM::command 'autocmd BufLeave <buffer> silent! ruby $command_t.leave'
107
109
  ::VIM::command 'autocmd BufUnload <buffer> silent! ruby $command_t.unload'
110
+ ::VIM::command 'augroup END'
108
111
 
109
112
  @has_focus = false
110
113
  @abbrev = ''
111
114
  @window = $curwin
112
115
  end
113
116
 
117
+ def buffer_number
118
+ @@buffer && @@buffer.number
119
+ end
120
+
114
121
  def close
115
122
  # Unlisted buffers like those provided by Netrw, NERDTree and Vim's help
116
123
  # don't actually appear in the buffer list; if they are the only such
@@ -197,7 +204,7 @@ module CommandT
197
204
  def find(char)
198
205
  # is this a new search or the continuation of a previous one?
199
206
  now = Time.now
200
- if @last_key_time.nil? or @last_key_time < (now - 0.5)
207
+ if @last_key_time.nil? || @last_key_time < (now - 0.5)
201
208
  @find_string = char
202
209
  else
203
210
  @find_string += char
@@ -401,21 +408,28 @@ module CommandT
401
408
  end
402
409
 
403
410
  def get_cursor_highlight
404
- # there are 3 possible formats to check for, each needing to be
411
+ # there are 4 possible formats to check for, each needing to be
405
412
  # transformed in a certain way in order to reapply the highlight:
406
413
  # Cursor xxx guifg=bg guibg=fg -> :hi! Cursor guifg=bg guibg=fg
407
414
  # Cursor xxx links to SomethingElse -> :hi! link Cursor SomethingElse
415
+ # Cursor xxx [definition]
416
+ # links to VisualNOS -> both of the above
408
417
  # Cursor xxx cleared -> :hi! clear Cursor
409
418
  highlight = VIM::capture 'silent! 0verbose highlight Cursor'
410
419
 
411
- if highlight =~ /^Cursor\s+xxx\s+links to (\w+)/
412
- "link Cursor #{$~[1]}"
413
- elsif highlight =~ /^Cursor\s+xxx\s+cleared/
414
- 'clear Cursor'
415
- elsif highlight =~ /Cursor\s+xxx\s+(.+)/
416
- "Cursor #{$~[1]}"
420
+ if highlight =~ /^Cursor\s+xxx\s+(.+)\blinks to (\w+)/m
421
+ [
422
+ Highlight.new("Cursor #{$~[1]}"),
423
+ Highlight.new("link Cursor #{$~[2]}", '!')
424
+ ]
425
+ elsif highlight =~ /^Cursor\s+xxx\s+links to (\w+)/m
426
+ [Highlight.new("link Cursor #{$~[1]}")]
427
+ elsif highlight =~ /^Cursor\s+xxx\s+cleared/m
428
+ [Highlight.new('clear Cursor')]
429
+ elsif highlight =~ /Cursor\s+xxx\s+(.+)/m
430
+ [Highlight.new("Cursor #{$~[1]}")]
417
431
  else # likely cause E411 Cursor highlight group not found
418
- nil
432
+ []
419
433
  end
420
434
  end
421
435
 
@@ -427,7 +441,10 @@ module CommandT
427
441
 
428
442
  def show_cursor
429
443
  if @cursor_highlight
430
- ::VIM::command "highlight #{@cursor_highlight}"
444
+ @cursor_highlight.each do |highlight|
445
+ config = highlight.highlight.gsub(/\s+/, ' ')
446
+ ::VIM::command "highlight#{highlight.bang} #{config}"
447
+ end
431
448
  end
432
449
  end
433
450
 
@@ -0,0 +1,17 @@
1
+ # Copyright 2010-2014 Greg Hurrell. All rights reserved.
2
+ # Licensed under the terms of the BSD 2-clause license.
3
+
4
+ module CommandT
5
+ module PathUtilities
6
+
7
+ private
8
+
9
+ def relative_path_under_working_directory(path)
10
+ # any path under the working directory will be specified as a relative
11
+ # path to improve the readability of the buffer list etc
12
+ pwd = File.expand_path(VIM::pwd) + '/'
13
+ path.index(pwd) == 0 ? path[pwd.length..-1] : path
14
+ end
15
+
16
+ end # module PathUtilities
17
+ end # module CommandT
@@ -150,7 +150,7 @@ module CommandT
150
150
  # prevent the status line from getting inadvertantly cleared
151
151
  # after our echo commands
152
152
  ::VIM::command 'redraw'
153
- while (highlight = args.shift) and (text = args.shift) do
153
+ while (highlight = args.shift) && (text = args.shift)
154
154
  text = VIM::escape_for_single_quotes text
155
155
  ::VIM::command "echohl #{highlight}"
156
156
  ::VIM::command "echon '#{text}'"
@@ -1,8 +1,12 @@
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/vim'
5
-
6
4
  module CommandT
7
- class Scanner; end
5
+ class Scanner
6
+ autoload :BufferScanner, 'command-t/scanner/buffer_scanner'
7
+ autoload :FileScanner, 'command-t/scanner/file_scanner'
8
+ autoload :JumpScanner, 'command-t/scanner/jump_scanner'
9
+ autoload :MRUBufferScanner, 'command-t/scanner/mru_buffer_scanner'
10
+ autoload :TagScanner, 'command-t/scanner/tag_scanner'
11
+ end # class Scanner
8
12
  end # module CommandT
@@ -1,21 +1,20 @@
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/vim/path_utilities'
5
- require 'command-t/scanner'
6
-
7
4
  module CommandT
8
- # Returns a list of all open buffers.
9
- class BufferScanner < Scanner
10
- include VIM::PathUtilities
5
+ class Scanner
6
+ # Returns a list of all open buffers.
7
+ class BufferScanner < Scanner
8
+ include PathUtilities
11
9
 
12
- def paths
13
- (0..(::VIM::Buffer.count - 1)).map do |n|
14
- buffer = ::VIM::Buffer[n]
15
- if buffer.name # beware, may be nil
16
- relative_path_under_working_directory buffer.name
17
- end
18
- end.compact
19
- end
20
- end # class BufferScanner
10
+ def paths
11
+ (0..(::VIM::Buffer.count - 1)).map do |n|
12
+ buffer = ::VIM::Buffer[n]
13
+ if buffer.name # beware, may be nil
14
+ relative_path_under_working_directory buffer.name
15
+ end
16
+ end.compact
17
+ end
18
+ end # class BufferScanner
19
+ end # class Scanner
21
20
  end # module CommandT
@@ -1,85 +1,94 @@
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/scanner'
5
-
6
4
  module CommandT
7
- # Reads the current directory recursively for the paths to all regular files.
8
- #
9
- # This is an abstract superclass; the real work is done by subclasses which
10
- # obtain file listings via different strategies (for examples, see the
11
- # RubyFileScanner and FindFileScanner subclasses).
12
- class FileScanner < Scanner
13
- class FileLimitExceeded < ::RuntimeError; end
14
- attr_accessor :path
5
+ class Scanner
6
+ # Reads the current directory recursively for the paths to all regular files.
7
+ #
8
+ # This is an abstract superclass; the real work is done by subclasses which
9
+ # obtain file listings via different strategies (for examples, see the
10
+ # RubyFileScanner and FindFileScanner subclasses).
11
+ class FileScanner < Scanner
12
+ # Errors
13
+ autoload :FileLimitExceeded, 'command-t/scanner/file_scanner/file_limit_exceeded'
14
+
15
+ # Subclasses
16
+ autoload :FindFileScanner, 'command-t/scanner/file_scanner/find_file_scanner'
17
+ autoload :GitFileScanner, 'command-t/scanner/file_scanner/git_file_scanner'
18
+ autoload :RubyFileScanner, 'command-t/scanner/file_scanner/ruby_file_scanner'
19
+ autoload :WatchmanFileScanner, 'command-t/scanner/file_scanner/watchman_file_scanner'
15
20
 
16
- def initialize(path = Dir.pwd, options = {})
17
- @paths = {}
18
- @paths_keys = []
19
- @path = path
20
- @max_depth = options[:max_depth] || 15
21
- @max_files = options[:max_files] || 30_000
22
- @max_caches = options[:max_caches] || 1
23
- @scan_dot_directories = options[:scan_dot_directories] || false
24
- @wild_ignore = options[:wild_ignore]
25
- @base_wild_ignore = wild_ignore
26
- end
21
+ attr_accessor :path
27
22
 
28
- def paths
29
- @paths[@path] ||= begin
30
- ensure_cache_under_limit
31
- @prefix_len = @path.chomp('/').length + 1
32
- set_wild_ignore { paths! }
23
+ def initialize(path = Dir.pwd, options = {})
24
+ @paths = {}
25
+ @paths_keys = []
26
+ @path = path
27
+ @max_depth = options[:max_depth] || 15
28
+ @max_files = options[:max_files] || 30_000
29
+ @max_caches = options[:max_caches] || 1
30
+ @scan_dot_directories = options[:scan_dot_directories] || false
31
+ @wild_ignore = options[:wild_ignore]
32
+ @scan_submodules = options[:git_scan_submodules] || false
33
+ @base_wild_ignore = wild_ignore
33
34
  end
34
- end
35
35
 
36
- def flush
37
- @paths = {}
38
- end
36
+ def paths
37
+ @paths[@path] ||= begin
38
+ ensure_cache_under_limit
39
+ @prefix_len = @path.chomp('/').length + 1
40
+ set_wild_ignore { paths! }
41
+ end
42
+ end
43
+
44
+ def flush
45
+ @paths = {}
46
+ end
39
47
 
40
- private
48
+ private
41
49
 
42
- def wild_ignore
43
- VIM::exists?('&wildignore') && ::VIM::evaluate('&wildignore').to_s
44
- end
50
+ def wild_ignore
51
+ VIM::exists?('&wildignore') && ::VIM::evaluate('&wildignore').to_s
52
+ end
45
53
 
46
- def paths!
47
- raise RuntimeError, 'Subclass responsibility'
48
- end
54
+ def paths!
55
+ raise RuntimeError, 'Subclass responsibility'
56
+ end
49
57
 
50
- def ensure_cache_under_limit
51
- # Ruby 1.8 doesn't have an ordered hash, so use a separate stack to
52
- # track and expire the oldest entry in the cache
53
- if @max_caches > 0 && @paths_keys.length >= @max_caches
54
- @paths.delete @paths_keys.shift
58
+ def ensure_cache_under_limit
59
+ # Ruby 1.8 doesn't have an ordered hash, so use a separate stack to
60
+ # track and expire the oldest entry in the cache
61
+ if @max_caches > 0 && @paths_keys.length >= @max_caches
62
+ @paths.delete @paths_keys.shift
63
+ end
64
+ @paths_keys << @path
55
65
  end
56
- @paths_keys << @path
57
- end
58
66
 
59
- def path_excluded?(path, prefix_len = @prefix_len)
60
- if apply_wild_ignore?
61
- # first strip common prefix (@path) from path to match VIM's behavior
62
- path = path[prefix_len..-1]
63
- path = VIM::escape_for_single_quotes path
64
- ::VIM::evaluate("empty(expand(fnameescape('#{path}')))").to_i == 1
67
+ def path_excluded?(path, prefix_len = @prefix_len)
68
+ if apply_wild_ignore?
69
+ # first strip common prefix (@path) from path to match VIM's behavior
70
+ path = path[prefix_len..-1]
71
+ path = VIM::escape_for_single_quotes path
72
+ ::VIM::evaluate("empty(expand(fnameescape('#{path}')))").to_i == 1
73
+ end
65
74
  end
66
- end
67
75
 
68
- def has_custom_wild_ignore?
69
- @wild_ignore && !@wild_ignore.empty?
70
- end
76
+ def has_custom_wild_ignore?
77
+ @wild_ignore && !@wild_ignore.empty?
78
+ end
71
79
 
72
- # Used to skip expensive calls to `expand()` when there is no applicable
73
- # wildignore.
74
- def apply_wild_ignore?
75
- has_custom_wild_ignore? || @base_wild_ignore
76
- end
80
+ # Used to skip expensive calls to `expand()` when there is no applicable
81
+ # wildignore.
82
+ def apply_wild_ignore?
83
+ has_custom_wild_ignore? || @base_wild_ignore
84
+ end
77
85
 
78
- def set_wild_ignore(&block)
79
- ::VIM::command("set wildignore=#{@wild_ignore}") if has_custom_wild_ignore?
80
- yield
81
- ensure
82
- ::VIM::command("set wildignore=#{@base_wild_ignore}") if has_custom_wild_ignore?
83
- end
84
- end # class FileScanner
86
+ def set_wild_ignore(&block)
87
+ ::VIM::command("set wildignore=#{@wild_ignore}") if has_custom_wild_ignore?
88
+ yield
89
+ ensure
90
+ ::VIM::command("set wildignore=#{@base_wild_ignore}") if has_custom_wild_ignore?
91
+ end
92
+ end # class FileScanner
93
+ end # class Scanner
85
94
  end # module CommandT