Is there a simple way to delete all text except newlines ?
I found one that removes all empty lines :g/^$/d.
but I am looking at the opposite functionality, some command that deletes everything except newlines ?
If you are wondering why, it's mainly because once you delete everything, you have to again press i and <Enter> a couple of times to recreate the space you are working with.
:%s/.*//do? – Friedrich May 17 '23 at 10:02I am new to vim, and tried chatGPT a few times before actually asking here.
– sourcevault May 17 '23 at 10:04:help. – Friedrich May 17 '23 at 10:28