Class: CommandT::Finder::TagFinder

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

Instance Method Summary collapse

Methods inherited from CommandT::Finder

#path=, #sorted_matches_for

Constructor Details

#initialize(options = {}) ⇒ TagFinder

Returns a new instance of TagFinder.



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

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

Instance Method Details

#flushObject



21
22
23
# File 'lib/command-t/finder/tag_finder.rb', line 21

def flush
  @scanner.flush
end

#nameObject



25
26
27
# File 'lib/command-t/finder/tag_finder.rb', line 25

def name
  'Tags'
end

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



12
13
14
15
16
17
18
19
# File 'lib/command-t/finder/tag_finder.rb', line 12

def open_selection(command, selection, options = {})
  if @scanner.include_filenames
    selection = selection[0, selection.index(':')]
  end

  #  open the tag and center the screen on it
  ::VIM::command "silent! tag #{selection} | :normal zz"
end