edit

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Actions

func Actions(ctx context.Context, c ui.Creator) ([]input.Action, error)

Types

type CallerStore added in v0.7.0

type CallerStore interface {
	input.Action
	Caller(context.Context, input.Binder) input.Action
}

type Changer

type Changer interface {
	input.Action
	Apply([]rune) input.Operation
	Delete(int) input.Operation
	ApplyEdit(...input.Edit) input.Operation
}

type Copy

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

func NewCopy

func NewCopy(ctx context.Context, c ui.Creator) *Copy

func (*Copy) DefaultEvent

func (c *Copy) DefaultEvent() string

func (*Copy) Menu

func (c *Copy) Menu(context.Context) string

func (*Copy) Name

func (c *Copy) Name(context.Context) string

func (*Copy) Op

func (c *Copy) Op(ctx context.Context, b input.Binder) (input.Operation, error)

func (*Copy) Type

func (c *Copy) Type(input.Command)

func (*Copy) Valid

func (c *Copy) Valid(ctx context.Context, b input.Binder) error

type Cut

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

func NewCut

func NewCut(ctx context.Context, c ui.Creator) *Cut

func (*Cut) DefaultEvent

func (c *Cut) DefaultEvent() string

func (*Cut) Menu

func (c *Cut) Menu(context.Context) string

func (*Cut) Name

func (c *Cut) Name(context.Context) string

func (*Cut) Op

func (c *Cut) Op(ctx context.Context, b input.Binder) (input.Operation, error)

func (*Cut) Type

func (c *Cut) Type(input.Command)

func (*Cut) Valid

func (c *Cut) Valid(ctx context.Context, b input.Binder) error

type Dedent

type Dedent struct {
}

func NewDedent

func NewDedent(ctx context.Context) *Dedent

func (*Dedent) DefaultEvent

func (c *Dedent) DefaultEvent() string

func (*Dedent) Menu

func (c *Dedent) Menu(context.Context) string

func (*Dedent) Name

func (c *Dedent) Name(context.Context) string

func (*Dedent) Op

func (*Dedent) Type

func (c *Dedent) Type(input.Command)

func (*Dedent) Valid

func (c *Dedent) Valid(ctx context.Context, b input.Binder) error

type Editor

type Editor interface {
	input.Binder
	State(context.Context) text.State
	Selections(context.Context) (caret.Selection, []caret.Selection)
}

type Find added in v0.7.0

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

func NewFind added in v0.7.0

func NewFind() *Find

func (*Find) ApplySelections added in v0.7.0

func (f *Find) ApplySelections(ctx context.Context) error

func (*Find) DefaultEvent added in v0.7.0

func (f *Find) DefaultEvent() string

func (*Find) Menu added in v0.7.0

func (f *Find) Menu(context.Context) string

func (*Find) Name added in v0.7.0

func (f *Find) Name(context.Context) string

func (*Find) Op added in v0.7.0

func (f *Find) Op(ctx context.Context, b input.Binder) (input.Operation, error)

func (*Find) ShowResult added in v0.7.0

func (f *Find) ShowResult(ctx context.Context, dir caret.Direction) error

func (*Find) Type added in v0.7.0

func (f *Find) Type(input.Command)

func (*Find) UpdatePattern added in v0.7.0

func (f *Find) UpdatePattern(ctx context.Context, pattern []rune) error

func (*Find) Valid added in v0.7.0

func (f *Find) Valid(ctx context.Context, b input.Binder) error

type FindHook added in v0.7.0

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

func NewFindHook added in v0.7.0

func NewFindHook() *FindHook

func (*FindHook) Name added in v0.7.0

func (*FindHook) Name(context.Context) string

func (*FindHook) OpNames added in v0.7.0

func (h *FindHook) OpNames(context.Context) []string

func (*FindHook) TextChanged added in v0.7.0

func (h *FindHook) TextChanged(ctx context.Context, b input.Binder, _ ...struct {
	Before text.State
	Edit   input.Edit
})

func (*FindHook) TextChangedOp added in v0.7.0

func (h *FindHook) TextChangedOp(ctx context.Context, b input.Binder) input.Operation

func (*FindHook) Type added in v0.7.0

func (*FindHook) Type(input.Hook)

func (*FindHook) Valid added in v0.7.0

func (h *FindHook) Valid(ctx context.Context, b input.Binder) error

type FindOther added in v0.7.0

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

func NewFindOther added in v0.7.0

func NewFindOther(dir caret.Direction) *FindOther

func (*FindOther) Menu added in v0.7.0

func (f *FindOther) Menu(context.Context) string

func (*FindOther) Name added in v0.7.0

func (f *FindOther) Name(context.Context) string

func (*FindOther) Op added in v0.7.0

func (*FindOther) Type added in v0.7.0

func (f *FindOther) Type(input.Command)

func (*FindOther) Valid added in v0.7.0

func (f *FindOther) Valid(ctx context.Context, b input.Binder) error

type Finder added in v0.7.0

type Finder interface {
	input.Action

	ShowResult(context.Context, caret.Direction) error
	UpdatePattern(context.Context, []rune) error
	ApplySelections(context.Context) error
}

type Indent

type Indent struct {
}

func NewIndent

func NewIndent(ctx context.Context) *Indent

func (*Indent) DefaultEvent

func (c *Indent) DefaultEvent() string

func (*Indent) Menu

func (c *Indent) Menu(context.Context) string

func (*Indent) Name

func (c *Indent) Name(context.Context) string

func (*Indent) Op

func (*Indent) Type

func (c *Indent) Type(input.Command)

func (*Indent) Valid

func (c *Indent) Valid(ctx context.Context, b input.Binder) error

type Paste

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

func NewPaste

func NewPaste(ctx context.Context, c ui.Creator) *Paste

func (*Paste) DefaultEvent

func (c *Paste) DefaultEvent() string

func (*Paste) Menu

func (c *Paste) Menu(context.Context) string

func (*Paste) Name

func (c *Paste) Name(context.Context) string

func (*Paste) Op

func (c *Paste) Op(ctx context.Context, b input.Binder) (input.Operation, error)

func (*Paste) Type

func (c *Paste) Type(input.Command)

func (*Paste) Valid

func (c *Paste) Valid(ctx context.Context, b input.Binder) error

type Prompt added in v0.7.0

type Prompt interface {
	input.Action

	Prompt(...ui.Span) input.Operation
	Caller(input.Action) input.Operation
}

type Selector added in v0.7.0

type Selector interface {
	input.Action
	Select(caret.Selection, ...caret.Selection) input.Operation
}

type Stater added in v0.7.0

type Stater interface {
	input.Binder
	Selections(context.Context) (caret.Selection, []caret.Selection)
	State(context.Context) text.State
}

Jump to

Keyboard shortcuts

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