Documentation ¶
Index ¶
- Constants
- type CaretHandler
- type Commander
- type Controller
- type Direction
- type Mod
- type MovedHook
- type Mover
- func (m *Mover) Bind(b bind.Bindable) (bind.HookedMultiOp, error)
- func (m *Mover) Exec() error
- func (m *Mover) For(dir Direction, mod Mod) bind.Bindable
- func (*Mover) Name() string
- func (m *Mover) Reset()
- func (m *Mover) Store(elem interface{}) bind.Status
- func (m *Mover) To(carets ...int) bind.Bindable
- type MovingHook
- type OnEdit
Constants ¶
View Source
const ( Select Mod = 1 << iota Word Whitespace Line = Word | Whitespace SelectWord = Select | Word SelectLine = Select | Line NoMod Mod = 0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaretHandler ¶
type Controller ¶
type Controller interface { Carets() []int MoveUp() SelectUp() MoveDown() SelectDown() MoveLeft() SelectLeft() MoveLeftByWord() SelectLeftByWord() MoveRight() SelectRight() MoveRightByWord() SelectRightByWord() MoveEnd() SelectEnd() MoveHome() SelectHome() }
type MovingHook ¶
type MovingHook interface {
Moving(e text.Editor, d Direction, m Mod, carets []int) (newD Direction, newM Mod, newCarets []int)
}
MovingHook is a hook that needs to trigger when the caret is moving. If d and/or carets need to be modified by the hook before carets actually move, the MovingHook can return a different direction and/or slice of carets.
Click to show internal directories.
Click to hide internal directories.