I want change fileformat of all the files.
So I open them use vim *
.
Then I want to know if there is any simple way to do this, rather than typing :set fileformat=unix
and :w
for each file one by one.
argdo
is what you want, not bufdo
, since you want to do it on every argument and you don't (necessarily) want to open every file first.
:argdo set ff=unix | update
should do the trick.
Maybe you need bufdo
?
:help bufdo
bufdo[!] {cmd} Execute {cmd} in each buffer in the buffer list.
It works like doing this:
:bfirst
:{cmd}
:bnext
:{cmd}
etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With