editor

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CharCtrlAt = iota
	CharCtrlA
	CharCtrlB
	CharCtrlC
	CharCtrlD
	CharCtrlE
	CharCtrlF
	CharCtrlG
	CharCtrlH
	CharCtrlI
	CharCtrlJ
	CharCtrlK
	CharCtrlL
	CharCtrlM
	CharCtrlN
	CharCtrlO
	CharCtrlP
	CharCtrlQ
	CharCtrlR
	CharCtrlS
	CharCtrlT
	CharCtrlU
	CharCtrlV
	CharCtrlW
	CharCtrlX
	CharCtrlY
	CharCtrlZ
	CharEscape

	// In ASCII, the first 32 codes are used for control characters, which are not printable.
	// EndOfControlCharacters represents the last of these characters, "^_".
	EndOfControlCharacters = 31

	CharBackspace = 127
)
View Source
const (
	OpNop = iota
	OpDelete
	OpYank
	OpChange
	OpLower
	OpUpper
	OpSwitchCase
	OpSiege
)

Variables

View Source
var ErrNoTextObj = errors.New("no such text object")

Functions

func Help

func Help(w io.Writer) error

Types

type Editor

type Editor interface {
	Read() ([]rune, bool, error)
	Clear()
	SetHistory([][]rune)
}

func New

func New(s screen.Screen, conf *config.Config, in io.Reader, out, err io.Writer) Editor

func NewContext

func NewContext(ctx context.Context, s screen.Screen, conf *config.Config, in io.Reader, out, err io.Writer) Editor

type ErrNoExCommand

type ErrNoExCommand struct {
	Name string
}

func (*ErrNoExCommand) Error

func (e *ErrNoExCommand) Error() string

type RecordableRuneReader

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

func NewReader

func NewReader(rd io.RuneReader) *RecordableRuneReader

func NewReaderContext

func NewReaderContext(ctx context.Context, rd io.RuneReader) *RecordableRuneReader

func (*RecordableRuneReader) ReadRune

func (rd *RecordableRuneReader) ReadRune() (r rune, size int, err error)

func (*RecordableRuneReader) Record

func (rd *RecordableRuneReader) Record()

func (*RecordableRuneReader) Stop

func (rd *RecordableRuneReader) Stop() []rune

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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