From 0a15bce060bda3c60d0cf521c6f213e35bf85175 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= <john@ankarstrom.se>
Date: Thu, 17 Jun 2021 15:07:55 +0200
Subject: vi.exrc: Add g/, gq and gQ commands

---
 vi.exrc | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/vi.exrc b/vi.exrc
index dce098e..3f69462 100644
--- a/vi.exrc
+++ b/vi.exrc
@@ -1,10 +1,22 @@
-" set mark like visual mode
+" set mark like vim's visual line mode
 map V mv
+
 " jump to other end of "selection"
 map v `v``mv``
+
 " operate on forward "selection"
 map : :'v,.
+
 " operate on backward "selection"
 map ; :.,'v
+
 " delete searched phrase
 map 
 :s///
+"map 
 i
:s///
k:j
l
+
+" search until line containing phrase
+map g/ /.*
+
+" edit "q buffer in new vi session
+map gQ m/:!echo > /tmp/vi.buf; vi /tmp/vi.buf

:r /tmp/vi.buf
"qdd`/
+map gq m/om("qpm):'(,')j
:'(w! /tmp/vi.buf
:'(d
:!vi /tmp/vi.buf

:r /tmp/vi.buf
"qdd`/
-- 
cgit v1.2.3