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

87058Re: File encoding & line ending in Vim

Expand Messages
  • Tony Mechelynck
    Feb 3, 2008
    • 0 Attachment
      Ciccio Bodoni wrote:
      > 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 will be able to find out yourself. If you can't type "Che sarà, sarà",
      "Dove non c'è pericolo non c'è gloria", "Faremo di necessità virtù" etc. with
      the correct accents, then you'll have to add a line before "set enc=utf-8" to
      avoid clobbering the 'termencoding' setting.


      Best regards,
      Tony.
      --
      GOD: That is your purpose Arthur ... the Quest for the Holy Grail ...
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      --~--~---------~--~----~------------~-------~--~----~
      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