Class: State
- Inherits:
-
Object
- Object
- State
- Defined in:
- lib/vimamsa/key_binding_tree.rb
Overview
In command mode: press keys “,” “r” “v” and “b” sequentially. ‘C , r v b’=> ‘revert_buffer’,
In insert mode: press and hold ctrl, press “a” ‘I ctrl-a’=> ‘vma.buf.jump(BEGINNING_OF_LINE)’,
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#children ⇒ Object
Returns the value of attribute children.
-
#cur_mode ⇒ Object
readonly
Returns the value of attribute cur_mode.
-
#cursor_type ⇒ Object
Returns the value of attribute cursor_type.
-
#eval_rule ⇒ Object
Returns the value of attribute eval_rule.
-
#key_name ⇒ Object
Returns the value of attribute key_name.
-
#keywords ⇒ Object
Returns the value of attribute keywords.
-
#label ⇒ Object
Returns the value of attribute label.
-
#level ⇒ Object
Returns the value of attribute level.
-
#major_modes ⇒ Object
Returns the value of attribute major_modes.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
-
#initialize(key_name, eval_rule = "", ctype = :command, scope: :buffer) ⇒ State
constructor
A new instance of State.
- #to_s ⇒ Object
Constructor Details
#initialize(key_name, eval_rule = "", ctype = :command, scope: :buffer) ⇒ State
Returns a new instance of State.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/vimamsa/key_binding_tree.rb', line 25 def initialize(key_name, eval_rule = "", ctype = :command, scope: :buffer) @key_name = key_name @eval_rule = eval_rule @children = [] @scope = scope @major_modes = [] @keywords = [] @action = nil @level = 0 @cursor_type = ctype end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def action @action end |
#children ⇒ Object
Returns the value of attribute children.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def children @children end |
#cur_mode ⇒ Object (readonly)
Returns the value of attribute cur_mode.
23 24 25 |
# File 'lib/vimamsa/key_binding_tree.rb', line 23 def cur_mode @cur_mode end |
#cursor_type ⇒ Object
Returns the value of attribute cursor_type.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def cursor_type @cursor_type end |
#eval_rule ⇒ Object
Returns the value of attribute eval_rule.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def eval_rule @eval_rule end |
#key_name ⇒ Object
Returns the value of attribute key_name.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def key_name @key_name end |
#keywords ⇒ Object
Returns the value of attribute keywords.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def keywords @keywords end |
#label ⇒ Object
Returns the value of attribute label.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def label @label end |
#level ⇒ Object
Returns the value of attribute level.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def level @level end |
#major_modes ⇒ Object
Returns the value of attribute major_modes.
22 23 24 |
# File 'lib/vimamsa/key_binding_tree.rb', line 22 def major_modes @major_modes end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
23 24 25 |
# File 'lib/vimamsa/key_binding_tree.rb', line 23 def scope @scope end |
Instance Method Details
#to_s ⇒ Object
37 38 39 |
# File 'lib/vimamsa/key_binding_tree.rb', line 37 def to_s() return @key_name end |