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

2563Re: .swp file left behind on Windows

Expand Messages
  • Mansing
    Dec 9, 2008
      I tried changing "enc=" to "fenc=" in my mode line:

      <!-- vim: set fo+=mM gfn=MingLiU\:h12 fenc=utf-8: -->

      but my Chinese text doesn't show up correctly (as if this option were
      omitted). I tried (after reading help 45.3 on ":edit ++enc=...") also
      "++enc=" and "\+\+enc=", but Vim says this is not a known option (for
      the mode line). Seems "enc=" is the only way that I can use to
      (automatically) tell Vim about my file encoding.

      Note that I am not complaining any problem: I am happy with "enc=" in my
      mode line as it works well with all context encodings I happened to use
      --Big5, GB2312, utf-8 etc. I am just perplexed to hear that this is the
      wrong way?

      mt 081210


      Patrick Texier wrote:
      > Le Tue, 9 Dec 2008 01:54:28 -0800 (PST), rpr a écrit dans le message
      > <aedde531-f6af-4b0d-a156-8d214f0704df@...> :
      >
      >> I'd like to achieve the same in vim for any text file: to put a
      >> command in the modeline so that vim, while opening the file, is able
      >> to recognize the character encoding used in the file and also to edit
      >> such text and save it in the same encoding. Is this possible in vim?
      >>
      > File encoding is set with 'fileencoding' option, not 'encoding'. You can
      > add a 'fenc' in a modeline but it's usefull only in rare cases (Latin9
      > vs Latin1). With set fileencodings = ucs-bom,utf-8,latin1 (default value
      > with Unicode) Vim will detect file encoding.
      >
      > You can read User Manual :help 45.3 for a good introduction.
      >

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