vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit a66cbe63baac46f8fc4f2c1e645bb9178250b980
parent 4738e281c434b05bc6e909646b689e14cdb2b785
Author: Marc André Tanner <mat@brain-dump.org>
Date: Fri, 13 Jan 2017 19:49:46 +0100
test/sam: add test for new grouping semantics
The more idomatic
,x/[a-zA-Z]+/{
g/Emacs/ v/....../ c/vi/
g/vi/ v/.../ c/Emacs/
}
does not seem to work on the sam version from 9base as shipped by
Ubuntu 12.04 LTS and used in the Travis environment.
Diffstat:
| A | sam/examples/swap-words.cmd | | | 4 | ++++ |
| A | sam/examples/swap-words.in | | | 2 | ++ |
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sam/examples/swap-words.cmd b/sam/examples/swap-words.cmd @@ -0,0 +1,4 @@ +,x/(Emacs|vi)/{ + g/Emacs/ v/....../ c/vi/ + g/vi/ v/.../ c/Emacs/ +} diff --git a/sam/examples/swap-words.in b/sam/examples/swap-words.in @@ -0,0 +1 @@ +Emacs is better than vi. +\ No newline at end of file