class Fir::TabCommand
Public Class Methods
character_regex()
click to toggle source
# File lib/fir/key_command/tab_command.rb, line 8 def self.character_regex /^\t$/ end
Public Instance Methods
execute_hook(new_state)
click to toggle source
# File lib/fir/key_command/tab_command.rb, line 12 def execute_hook(new_state) new_state.current_line = state.current_line.clone.insert( state.cursor.x, *state.suggestion.split('') ).flatten new_state.cursor = state.cursor.right(state.suggestion.length) new_state.history.reset new_state end