Loading ...
Sorry, an error occurred while loading the content.

87052Re: File encoding & line ending in Vim

Expand Messages
  • Ciccio Bodoni
    Feb 3, 2008
    • 0 Attachment
      Many thanks, especially to Ben Schmidt: my mind is really clearer now!

      I got things done with just three line in my _vimrc file:


      set encoding=utf-8

      --> Every new file I create in vim will be utf-8. Moreover vim is now
      able to read existing utf-8 files without displaying strange
      characters.


      set fileformat=unix
      --> Default line ending for new files created in vim is now LF (unix).


      set fileformats=unix,dos

      --> Please note that the default value for fileformats (ffs) is
      "dos,unix". In fact in both cases vim is able to read also files with
      dos line endings. But setting fileformats to "unix,dos" will avoid
      that existing empty files are opened as dos.


      With these simple lines my Windows machine works smoothly with my co-
      workers' Macs+Textmate (see Textmate default saving settings:
      http://macromates.com/textmate/manual/saving_files.html)

      Please tell me if my choices are right.

      CB
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 10 messages in this topic