diff options
author | John Ankarström <john@ankarstrom.se> | 2021-05-25 01:20:35 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-05-25 01:20:35 +0200 |
commit | 5dd1844b66908cb16f7b7e1a792a11b9780de183 (patch) | |
tree | 3346540309985fc0369cb514dad6fad2bdec4673 | |
parent | 4d759d9835082f8036d693421d786c1ac297f386 (diff) | |
download | vp-5dd1844b66908cb16f7b7e1a792a11b9780de183.tar.gz |
Preserve position after 'g' command
This unfortunately requires copying the command, which is visible
for a short amount of time. But function should trump form here.
-rwxr-xr-x | vpeval | 4 | ||||
-rw-r--r-- | vprc | 3 |
2 files changed, 3 insertions, 4 deletions
@@ -1,4 +1,2 @@ #!/bin/sh -c=`sed '/^#/d'` -echo "$c" -echo "$(eval "$c" 2>&1)" | sed 's/^/# /' +echo "$(eval "$(sed '/^#/d')" 2>&1)" | sed 's/^/# /' @@ -1,2 +1,3 @@ -map g :1,$!vpeval
/^#
k$ +set leftright +map g mgGo#:1
y/^#
nP!Gvpeval
`g map q :1,/^#/-1d
:%s/^# //g
:1
|