fork download
  1. function! s:set_fileformat()
  2. if &fileformat != "unix" && input("setlocal fileformat=unix?[y/n]") == "y"
  3. try
  4. setlocal fileformat=unix
  5. catch
  6. endtry
  7. endif
  8. endfunction
  9. autocmd BufRead * :call <SID>set_fileformat()
  10.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty