ed

command
v7.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

address.go - contains methods for FileBuffer for line address resolution

commands.go - defines editor commands

This `ed` is intended to be a feature-complete mimick of [GNU Ed](https://www.gnu.org/software/ed//). It is a close enough mimick that the [GNU Ed Man Page](https://www.gnu.org/software/ed/manual/ed_manual.html) should be a reliable source of documentation. Divergence from the man page is generally considered a bug (unless it's an added feature).

There are a few known differences:

- `ed` uses `go`'s `regexp` package, and as such may have a somewhat different regular expression syntax. Note, however, that backreferences follow the `ed` syntax of `\<ref>`, not the `go` syntax of `$<ref>`. - there has been little/no attempt to make particulars like error messages match `GNU Ed`. - rather than being an error, the 'g' option for 's' simply overrides any specified count. - does not support "traditional" mode

The following has been implemented: - Full line address parsing (including RE and markings) - Implmented commands: !, #, =, E, H, P, Q, W, a, c, d, e, f, h, i, j, k, l, m, n, p, q, r, s, t, u, w, x, y, z

The following has *not* yet been implemented, but will be eventually: - Unimplemented commands: g, G, v, V - does not (yet) support "loose" mode - does not (yet) support "restricted" mod

filebuffer.go - defines the FileBuffer object

Jump to

Keyboard shortcuts

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