Class: CommandT::Finder::HelpFinder
- Inherits:
-
CommandT::Finder
- Object
- CommandT::Finder
- CommandT::Finder::HelpFinder
- Defined in:
- lib/command-t/finder/help_finder.rb
Instance Method Summary collapse
- #flush ⇒ Object
-
#initialize(options = {}) ⇒ HelpFinder
constructor
A new instance of HelpFinder.
- #name ⇒ Object
- #open_selection(command, selection, options = {}) ⇒ Object
- #prepare_selection(selection) ⇒ Object
Methods inherited from CommandT::Finder
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( = {}) @scanner = Scanner::HelpScanner.new @matcher = Matcher.new @scanner, :always_show_dot_files => true end |
Instance Method Details
#flush ⇒ Object
37 38 39 |
# File 'lib/command-t/finder/help_finder.rb', line 37 def flush @scanner.flush end |
#name ⇒ Object
41 42 43 |
# File 'lib/command-t/finder/help_finder.rb', line 41 def name 'Help' end |
#open_selection(command, selection, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/command-t/finder/help_finder.rb', line 12 def open_selection(command, selection, = {}) # E434 "Can't find tag pattern" is innocuous, caused by tags like # # LanguageClient.txt LanguageClient.txt /*LanguageClient.txt* # # From: # # https://github.com/autozimu/LanguageClient-neovim # # Which has no corresponding target inside the help file. # # Related: # # https://github.com/autozimu/LanguageClient-neovim/pull/731 # ::VIM::command "try | help #{selection} | catch /E434/ | endtry" end |
#prepare_selection(selection) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/command-t/finder/help_finder.rb', line 30 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 |