From 5dd1844b66908cb16f7b7e1a792a11b9780de183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 25 May 2021 01:20:35 +0200 Subject: 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. --- vprc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vprc') diff --git a/vprc b/vprc index 6616e50..348d5cb 100644 --- a/vprc +++ b/vprc @@ -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 -- cgit v1.2.3