aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-09 15:12:52 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-09 15:12:52 +0100
commit0c6048882bf62a373f30f9ce55ed4fac22d115df (patch)
treefc3944891a7475eccff7e558496f4f4857c7a36c /vim
parenta2b9d637082a633cfdaa96bd74276141c27d5f6d (diff)
downloadvis-0c6048882bf62a373f30f9ce55ed4fac22d115df.tar.gz
vis-0c6048882bf62a373f30f9ce55ed4fac22d115df.tar.xz
test/vim: add test for `r` in normal/visual mode
Diffstat (limited to 'vim')
-rw-r--r--vim/operators/replace/replace.in5
-rw-r--r--vim/operators/replace/replace.keys8
2 files changed, 13 insertions, 0 deletions
diff --git a/vim/operators/replace/replace.in b/vim/operators/replace/replace.in
new file mode 100644
index 0000000..0b61652
--- /dev/null
+++ 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
new file mode 100644
index 0000000..8857e98
--- /dev/null
+++ 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 */