sminez / ad

an adaptable text editor
https://crates.io/crates/ad-editor
MIT License
265 stars 9 forks source link

Addr parsing should support richer suffixes as in acme #21

Closed sminez closed 1 month ago

sminez commented 2 months ago

Acme supports a richer addressing syntax that ad currently does (see here for a demo). In particular, the parsing of a suffix is limited to known 2 character patterns rather than the example demoed by rsc.

# This currently works as an explicitly handled pattern of "line:column"
src/buffer/mod.rs:684:29

# This should have the same effect (note 28 vs 29) as "line, move to start of line, move forward chars"
src/buffer/mod.rs:684-+#28

This should be relatively simple to implement if the set of valid manipulations is accepted as an arbitrary concatenated suffix.

sminez commented 1 month ago

implemented in #39