Class: CommandT::Finder::HistoryFinder
Instance Method Summary
collapse
#path=, #sorted_matches_for
Constructor Details
#initialize(options = {}) ⇒ HistoryFinder
Returns a new instance of HistoryFinder.
7
8
9
10
11
|
# File 'lib/command-t/finder/history_finder.rb', line 7
def initialize(options = {})
@history_type = options[:history_type] @scanner = Scanner::HistoryScanner.new("silent history #{@history_type}")
@matcher = Matcher.new @scanner, :always_show_dot_files => true
end
|
Instance Method Details
#flush ⇒ Object
20
|
# File 'lib/command-t/finder/history_finder.rb', line 20
def flush; end
|
#name ⇒ Object
22
23
24
|
# File 'lib/command-t/finder/history_finder.rb', line 22
def name
@history_type == ':' ? 'History' : 'Searches'
end
|
#open_selection(command, selection, options = {}) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/command-t/finder/history_finder.rb', line 13
def open_selection(command, selection, options = {})
unescaped = selection.gsub(/\\(.)/, '\1')
escaped = VIM.escape_for_single_quotes unescaped
::VIM::command "call feedkeys('#{@history_type}#{escaped} ', 'nt')"
end
|