Class: CommandT::Finder::HelpFinder

Inherits:
CommandT::Finder show all
Defined in:
lib/command-t/finder/help_finder.rb

Instance Method Summary collapse

Methods inherited from CommandT::Finder

#path=, #sorted_matches_for

Constructor Details

#initialize(options = {}) ⇒ HelpFinder

Returns a new instance of HelpFinder.



7
8
9
10
# File 'lib/command-t/finder/help_finder.rb', line 7

def initialize(options = {})
  @scanner = Scanner::HelpScanner.new
  @matcher = Matcher.new @scanner, :always_show_dot_files => true
end

Instance Method Details

#flushObject



23
24
25
# File 'lib/command-t/finder/help_finder.rb', line 23

def flush
  @scanner.flush
end

#nameObject



27
28
29
# File 'lib/command-t/finder/help_finder.rb', line 27

def name
  'Help'
end

#open_selection(command, selection, options = {}) ⇒ Object



12
13
14
# File 'lib/command-t/finder/help_finder.rb', line 12

def open_selection(command, selection, options = {})
  ::VIM::command "help #{selection}"
end

#prepare_selection(selection) ⇒ Object



16
17
18
19
20
21
# File 'lib/command-t/finder/help_finder.rb', line 16

def prepare_selection(selection)
  # Pass selection through as-is, bypassing path-based stuff that the
  # controller would otherwise do, like `expand_path`,
  # `sanitize_path_string` and `relative_path_under_working_directory`.
  selection
end