How to set the character encoding for a file in VIM

后端 未结 6 1797
孤街浪徒
孤街浪徒 2020-12-07 23:05

I\'m using :set fileencoding=utf-8 and the file is saved correctly, but the next time I open it, I get garbled characters and :set fileencoding? sa

6条回答
  •  生来不讨喜
    2020-12-07 23:33

    If vim doesn't display your file correctly when opened specify encoding with :set encoding=utf8

提交回复
热议问题