vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 089c6cb57e591d44e7562097ae58023b398fdee4 parent ab88ccc18d6ec4c8566ff93b677b02b48ba8924e Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 15 Feb 2017 21:44:58 +0100 test/vis: add a test for the lexer text object Diffstat:
| A | vis/text-objects/lexer.in | | | 6 | ++++++ |
| A | vis/text-objects/lexer.keys | | | 5 | +++++ |
| A | vis/text-objects/lexer.ref | | | 6 | ++++++ |
3 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/vis/text-objects/lexer.in b/vis/text-objects/lexer.in @@ -0,0 +1,6 @@ +/* + * cafe or tea? + */ +void drink() { + printf("cafe: %d\n", 0xcafebeef); +} diff --git a/vis/text-objects/lexer.keys b/vis/text-objects/lexer.keys @@ -0,0 +1,5 @@ +:set syntax ansi_c<Enter> +:x/cafe<Enter> +ii +:{ i/>/ a/</ }<Enter> +<Escape> diff --git a/vis/text-objects/lexer.ref b/vis/text-objects/lexer.ref @@ -0,0 +1,6 @@ +>/* + * cafe or tea? + */< +void drink() { + printf(>"cafe: %d\n"<, >0xcafebeef<); +}