vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 916c5eeca780c969fc538d9c530b01f86cc7fb3f parent 12a8d7475c720a9547bcfb00ceb54113b9b2a654 Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 9 Nov 2016 15:12:52 +0100 test/vim: add test for `r` in normal/visual mode Diffstat:
| A | vim/operators/replace/replace.in | | | 5 | +++++ |
| A | vim/operators/replace/replace.keys | | | 8 | ++++++++ |
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/vim/operators/replace/replace.in b/vim/operators/replace/replace.in @@ -0,0 +1,5 @@ +int foo() { + /* --- --- */ + return 42; + /* --- --- */ +} diff --git a/vim/operators/replace/replace.keys b/vim/operators/replace/replace.keys @@ -0,0 +1,8 @@ +t{r<Enter> /* replace space with new line */ +/---<Enter> +3r= /* replace --- with === */ +n /* advance to next match */ +. /* repeat */ +n /* advance to next match */ +v2e /* select something in visual mode */ +r= /* replace selection */