I want to use a regex to replace some strings in my file. I search for:
%s/^ [a-z]*/ /
what I want to do is to replace every [a-z]* that have 2 whitespaces with the sane [a-z] prepended with 4 whitespaces. Is there any “inplace” replacement or how would I reach that with vim?
With best regards
I find it more straightforward to use the
\zeobject to define the end of the match:so the
[a-z]*is not included in the replace, but just used to match the relevant spaces.