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

autocmd to recognise encoding by file name?

Expand Messages
  • yecril
    Apache httpd officially sets charset of .latin2.html files to ISO-8859-2 [1], and so should vim. au BufNewFile,BufReadPre *.latin2.html :e ++enc=latin2 That is
    Message 1 of 1 , Nov 14, 2010
    • 0 Attachment
      Apache httpd officially sets charset of .latin2.html files to
      ISO-8859-2 [1], and so should vim.

      au BufNewFile,BufReadPre *.latin2.html :e ++enc=latin2

      That is the idea, although I do not know whether it is correct, where
      to put it, how to handle file read/write and the like. The same
      applies to other supported encodings as well. Also, no idea how to
      handle multiple extensions; it seems that httpd actually
      prefers .html.latin2 because of MultiViews (selecting candidate
      sources on the fly).

      [1] <URL: file:///etc/apache2/mod_mime-defaults.conf >

      --
      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.