From 58c47135b8ccb48c875854840e2e1ad3fab876b1 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 21 Dec 2017 12:45:25 +0100 Subject: Added useful global command to shortcuts.txt --- doc/shortcuts.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/shortcuts.txt') diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt index 159f20a..d70855f 100644 --- a/doc/shortcuts.txt +++ b/doc/shortcuts.txt @@ -26,6 +26,7 @@ caw = select 'a word' :%s/foo/bar/g = replace all foo with bar :g/foo/s/bar//g = on lines with foo replace bar with nothing :g!/foo/s/bar//g = on lines not containing foo replace bar with nothing +:g!/^foo/execute("normal dd") delete lines starting with foo [visual mode] # with selected lines gq = formats text so that it fits in whatever :set textwidth was set -- cgit v1.2.3