summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vi.exrc17
1 files changed, 8 insertions, 9 deletions
diff --git a/vi.exrc b/vi.exrc
index 9d0f228..51a42c1 100644
--- a/vi.exrc
+++ b/vi.exrc
@@ -1,10 +1,13 @@
set para=IPLPPPQPP\ LIp\ q\ d\ l\ (l)l(\ )\ pplpipbp
set sect=NHSHH\ HUt\ h\ s\ hesesh
+" various mappings
map [ [[
map ] ]]
map < 1G
map > G
+map * {!}fmt }
+map K k$
" set mark like vim's visual mode
map V mv
@@ -22,17 +25,13 @@ map ; :.,'v
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`/
-
" go to next/previous space
-map gw f
-map gb F
+map w f
+map b F
" go to next/previous troff command
map  /^[.'][^ ]*$
map  ?^[.'][^ ]*$
+
+" format C comment
+map * :?\/\*?+1,/\*\//-1s/ \*/ / :?\/\*?+1,/\*\//-1!fmt :?\/\*?+1,/\*\//-1s/ / */