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

2562Re: .swp file left behind on Windows

Expand Messages
  • Tony Mechelynck
    Dec 9, 2008
      On 09/12/08 18:39, 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.

      ...and if it detects the wrong value (let's say Vim detects latin1 on an
      iso-8859-2 file) you can reload the file with an override, as in

      :e ++enc=iso-8859-2

      See also ":help ++opt".

      > You can read User Manual :help 45.3 for a good introduction.

      also the Vim Tip about Unicode, mentioned earlier in this thread.

      Best regards,
      LAUNCELOT: At last! A call! A cry of distress ...
      (he draws his sword, and turns to CONCORDE)
      Concorde! Brave, Concorde ... you shall not have died in vain!
      CONCORDE: I'm not quite dead, sir ...
      "Monty Python and the Holy Grail" PYTHON (MONTY)

      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