Module: VER::Keymapped

Included in:
Buffer, Executor::Entry, HoverCompletion::Listbox, MiniBuffer
Defined in:
lib/ver/keymap/keymapped.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#major_modeObject

Returns the value of attribute major_mode.



3
4
5
# File 'lib/ver/keymap/keymapped.rb', line 3

def major_mode
  @major_mode
end

Instance Method Details

#minor_mode(*args, old, new) ⇒ Object



16
17
18
# File 'lib/ver/keymap/keymapped.rb', line 16

def minor_mode(*args, old, new)
  major_mode.replace_minor(old, new)
end

#minor_mode?(name) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
23
# File 'lib/ver/keymap/keymapped.rb', line 20

def minor_mode?(name)
  name = name.to_sym
  major_mode.minors.find{|minor| minor.to_sym == name }
end