https://github.com/orbitalquark/textadept-ruby
Ruby language module for Textadept.
https://github.com/orbitalquark/textadept-ruby
rails ruby ruby-on-rails textadept textadept-module
Last synced: about 1 year ago
JSON representation
Ruby language module for Textadept.
- Host: GitHub
- URL: https://github.com/orbitalquark/textadept-ruby
- Owner: orbitalquark
- License: mit
- Archived: true
- Created: 2020-10-07T17:28:06.000Z (over 5 years ago)
- Default Branch: default
- Last Pushed: 2023-01-24T02:14:40.000Z (over 3 years ago)
- Last Synced: 2025-02-28T22:11:51.185Z (over 1 year ago)
- Topics: rails, ruby, ruby-on-rails, textadept, textadept-module
- Language: Lua
- Homepage:
- Size: 579 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ruby
The ruby module for Textadept.
It provides utilities for editing Ruby code.
**WARNING:** this module is deprecated. It will no longer work in Textadept 12.0.
## Key Bindings
+ `Shift+Enter` (`⇧↩` | `S-Enter`)
Try to autocomplete an `if`, `while`, `for`, etc. control structure with `end`.
## Functions defined by `_M.ruby`
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.
### `_M.ruby.try_to_autocomplete_end`()
Tries to autocomplete Ruby's `end` keyword for control structures like `if`, `while`, `for`, etc.
See also:
* [`_M.ruby.control_structure_patterns`](#_M.ruby.control_structure_patterns)
## Tables defined by `_M.ruby`
### `_M.ruby.control_structure_patterns`
Patterns for auto `end` completion for control structures.
See also:
* [`_M.ruby.try_to_autocomplete_end`](#_M.ruby.try_to_autocomplete_end)
Map of expression patterns to their types.
Expressions are expected to match after the '=' sign of a statement.
List of "fake" ctags files to use for autocompletion.
In addition to the normal ctags kinds for Ruby, the kind 'C' is recognized as a constant and
'a' as an attribute.
---