looking for a UTF-8 text editor

前端 未结 23 1444
自闭症患者
自闭症患者 2021-01-01 05:40

I am looking for a (simple) text editor that can handle text in different encodings in the same document.

I need to develop some sites with mixed Japanese and Englis

23条回答
  •  [愿得一人]
    2021-01-01 06:01

    Vim works fine for me as a UTF-8 text editor.

    Firstly, you need a font that has the characters you are using. Choosing another text editor won't help you with this (unless it searches for other fonts for the correct characters when the font you are using doesn't have them). If you are using gVim, you can set the font like:

    set guifont=Consolas
    

    (This is not to say that Consolas is the font you want.) You probably want to put this in the .vimrc file so that it is always used.

    Secondly, Vim needs to interpret the file as UTF-8, which it doesn't always automatically do. To make it do this, do:

    set encoding=utf8
    

    You can also see what encoding it is using with:

    set encoding?
    

提交回复
热议问题