edit

package
v0.0.0-...-8ec759b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	G_FLAG = 1 << iota
)
View Source
const LOOP_LIMIT = 2000

Variables

View Source
var NewJob func(wd, Cmd, input string, buf *buf.Buffer, resultChan chan<- string)
View Source
var Warnfn func(msg string)

Functions

func AddrEval

func AddrEval(pgm string, b *buf.Buffer, sel util.Sel) util.Sel

func Dcmdfn

func Dcmdfn(c *Cmd, ec *EditContext)

func Edit

func Edit(pgm string, ec EditContext)

func Mcmdfn

func Mcmdfn(c *Cmd, ec *EditContext)

func XYcmdfn

func XYcmdfn(inv bool, c *Cmd, ec *EditContext)

Types

type Addr

type Addr interface {
	Empty() bool
	String() string
	Eval(b *buf.Buffer, sel util.Sel) util.Sel
}

type AddrBase

type AddrBase struct {
	Batype string
	Value  string
	Dir    int
}

func (*AddrBase) Empty

func (e *AddrBase) Empty() bool

func (*AddrBase) Eval

func (e *AddrBase) Eval(b *buf.Buffer, sel util.Sel) (rsel util.Sel)

func (*AddrBase) String

func (e *AddrBase) String() string

type AddrList

type AddrList struct {
	Addrs []Addr
}

func (*AddrList) Empty

func (e *AddrList) Empty() bool

func (*AddrList) Eval

func (e *AddrList) Eval(b *buf.Buffer, sel util.Sel) (rsel util.Sel)

func (*AddrList) String

func (e *AddrList) String() string

type AddrOp

type AddrOp struct {
	Op string
	Lh Addr
	Rh Addr
}

func (*AddrOp) Empty

func (e *AddrOp) Empty() bool

func (*AddrOp) Eval

func (e *AddrOp) Eval(b *buf.Buffer, sel util.Sel) util.Sel

func (*AddrOp) String

func (e *AddrOp) String() string

type BufferManaging

type BufferManaging interface {
	Open(name string) *buf.Buffer
	List() []BufferManagingEntry
	Close(buf *buf.Buffer)
	RefreshBuffer(buf *buf.Buffer)
}

type BufferManagingEntry

type BufferManagingEntry struct {
	Buffer *buf.Buffer
	Sel    *util.Sel
}

type Cmd

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

func Parse

func Parse(pgm []rune) *Cmd

func ToMark

func ToMark(pgm *Cmd) *Cmd

func (*Cmd) Exec

func (ecmd *Cmd) Exec(ec EditContext)

func (*Cmd) String

func (ecmd *Cmd) String(showregex bool) string

type EditContext

type EditContext struct {
	Buf *buf.Buffer
	Sel *util.Sel

	EventChan chan string
	BufMan    BufferManaging
	Trace     bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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