What is the ‘fileencodings’ option?

The ‘fileencodings’ option defines the heuristics used by Vim when opening an existing file. It is a comma separated list of encodings. A special name, “ucs-bom” is used to indicate that Vim should check for the presence of a byte-order mark; however, it will not be recognised if it comes after “utf-8”. Normally, “ucs-bom” (if present) should be first in the list. When Vim opens a file, it checks it against the encodings listed in ‘fileencodings’. The first one that matches is used. If there is no match, then Vim sets ‘fileencoding’ to the null string, i.e., the value of ‘encoding’ will be used.

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind