mode

package
v0.0.0-...-2ab8766 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadTextObject error = errors.New("bad text object")

Functions

func NewInsertMode

func NewInsertMode(editor *editor.Editor, count int) insertMode

func NewNormalMode

func NewNormalMode(e *editor.Editor) *normalMode

func NewVisualMode

func NewVisualMode(e *editor.Editor, lineMode bool) *visualMode

Types

type CommandMode

type CommandMode struct {
	editor.Overlay
	// contains filtered or unexported fields
}

func NewCommandMode

func NewCommandMode(editor *editor.Editor, mode editor.Mode) CommandMode

func (CommandMode) CursorPosition

func (m CommandMode) CursorPosition() (int, int)

func (CommandMode) Draw

func (m CommandMode) Draw()

func (CommandMode) Enter

func (m CommandMode) Enter(e *editor.Editor)

func (CommandMode) Exit

func (m CommandMode) Exit()

func (CommandMode) NeedsCursor

func (m CommandMode) NeedsCursor() bool

func (CommandMode) OnKey

func (m CommandMode) OnKey(ev *termbox.Event)

type SearchMode

type SearchMode struct {
	editor.Overlay
	// contains filtered or unexported fields
}

func NewSearchMode

func NewSearchMode(editor *editor.Editor, mode editor.Mode) SearchMode

func (SearchMode) CursorPosition

func (m SearchMode) CursorPosition() (int, int)

func (SearchMode) Draw

func (m SearchMode) Draw()

func (SearchMode) Enter

func (m SearchMode) Enter(e *editor.Editor)

func (SearchMode) Exit

func (m SearchMode) Exit()

func (SearchMode) NeedsCursor

func (m SearchMode) NeedsCursor() bool

func (SearchMode) OnKey

func (m SearchMode) OnKey(ev *termbox.Event)

type TextObjectMode

type TextObjectMode struct {
	// contains filtered or unexported fields
}

func NewTextObjectMode

func NewTextObjectMode(editor *editor.Editor, mode editor.Mode, f buffer.RangeFunc, count int) *TextObjectMode

func (*TextObjectMode) Enter

func (m *TextObjectMode) Enter(e *editor.Editor)

func (*TextObjectMode) Exit

func (m *TextObjectMode) Exit()

func (*TextObjectMode) OnKey

func (m *TextObjectMode) OnKey(ev *termbox.Event)

type WindowMode

type WindowMode struct {
	// contains filtered or unexported fields
}

func NewWindowMode

func NewWindowMode(editor *editor.Editor, count int) WindowMode

func (WindowMode) Enter

func (m WindowMode) Enter(e *editor.Editor)

func (WindowMode) Exit

func (m WindowMode) Exit()

func (WindowMode) OnKey

func (m WindowMode) OnKey(ev *termbox.Event)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL