Global Substitution with Vim
With Vim, you can use a global substitution to remove everything but spaces and newlines. For example:
:%s/[^ \n]//g
Domanda
I want to use vi to get rid of all characters in the file that are not spaces and newlines. The syntax I know, removes the entire line which is not what I want, how can I edit it? Thanks.
:1,$g:[a-z|A-Z]:d
Soluzione
With Vim, you can use a global substitution to remove everything but spaces and newlines. For example:
:%s/[^ \n]//g