diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-17 15:07:55 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-17 15:07:55 +0200 |
commit | 0a15bce060bda3c60d0cf521c6f213e35bf85175 (patch) | |
tree | e67106a0bf9fbb2192bacfae1433469b674d7f8d | |
parent | 5304018d0b1559b33c2effb3beaafe54df197455 (diff) | |
download | exrc-0a15bce060bda3c60d0cf521c6f213e35bf85175.tar.gz |
vi.exrc: Add g/, gq and gQ commands
-rw-r--r-- | vi.exrc | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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`/ |