14
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

とりあえず文字化けを直す.vimrc

Posted at

vi(m)の良いところは、unixの系譜につらなるOSならばまず間違いなくインストールされているところ。

東に読みたいファイルがあればすかさずvi。
西に開きたいファイルがあっても慌てず騒がずvi。
常識です。

しかし結構日本語が文字化けしたりするんですよね。
これはマルチバイト圏に住むvi使いにとって宿命だと思われます。

そんな時はそっと.vimrcに以下の2行を追加してreopen。

set encoding=utf-8
set fileencodings=utf-8,iso-2022-jp,euc-jp,cp932,sjis

これでほぼ文字化けは直ります。
ぜひお試しください。

14
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?