vim - Convert line endings on save -


as understand, can convert line endings unix dos way:

:set ff=dos 

but how can automatically, on save?

for example, tried:

autocmd bufwritepre * :%s\:set\ ff=dos 

but doesn't work.

the :%s\: in au doesn't make sense..

if want set option before write, can just:

autocmd bufwritepre * set name=value 

Comments