Contents

_M.ruby

The ruby module. It provides utilities for editing Ruby code.

Key Bindings


Fields


sense

The Ruby Adeptsense. It loads user tags from _USERHOME/modules/ruby/tags and user apidocs from _USERHOME/modules/ruby/api.


Functions


toggle_block()

Toggles between { ... } and do ... end Ruby blocks. If the caret is inside a { ... } single-line block, that block is converted to a multiple-line do .. end block. If the caret is on a line that contains single-line do ... end block, that block is converted to a single-line { ... } block. If the caret is inside a multiple-line do ... end block, that block is converted to a single-line { ... } block with all newlines replaced by a space. Indentation is important. The do and end keywords must be on lines with the same level of indentation to toggle correctly.


try_to_autocomplete_end()

Tries to autocomplete Ruby’s end keyword for control structures like if, while, for, etc.

See also:


Tables


_G.keys.ruby

Container for Ruby-specific key bindings.


_G.snippets.ruby

Container for Ruby-specific snippets.


control_structure_patterns

Patterns for auto end completion for control structures.

See also: