How to set the character encoding for a file in VIM -


I am using : set fileencoding = utf-8 and saved the file properly But the next time I open it, I get distorted letters and : set fileencoding? says that the option is not set.

From Docs I understand that I should not touch encoding option.

What is the correct way to specify the encoding for the file in VIM?

use

  set fileencodings = utf-8  

(finally with one) in which a different encoding list will attempt to list inventive encoding, unless one thing is done and it will set up the filecoding in that encoding. If none works, file encoding is set to an empty string which will result in default behavior.

In addition to this it would probably mean adding your vimrc so that you do not have to do this continuously.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -