summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vi.exrc14
1 files changed, 13 insertions, 1 deletions
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`/