Module: EditorCore
- Defined in:
- lib/editor_core/core.rb,
lib/editor_core.rb,
lib/editor_core/buffer.rb,
lib/editor_core/cursor.rb,
lib/editor_core/history.rb,
lib/editor_core/version.rb
Overview
# Core
Generic editor functionality that only depends on ‘Buffer`, `Cursor` and bare minimum of `View`
Functionality that goes here should only be “objective” behaviours. E.g. what it means to move a cursor to the right is mostly objective. What should happen on enter probably isn’t (may or may not include indenting the next line, may or may not involve stripping trailing whitespace, etc.). Methods for the objective, constituent parts of subjective/opinionated operations can be added here (e.g. an “enter” method which defers the subjective parts to a block or some hook mechanism could.
Knows nothing of configuration or “fancier” options, which should generally be handled in a subclass
‘@view` must support `#top`/`#top=` and `#height` to control the viewable portion.
Defined Under Namespace
Classes: Buffer, Core, Cursor, Error, History
Constant Summary collapse
- VERSION =
"0.3.0"