LoginSignup
89

More than 5 years have passed since last update.

Atom でエンコーディングを自動判別するパッケージ auto-encoding

Last updated at Posted at 2016-01-06

TL;DR

Atom(1.3.2)でファイルを開いたときにエンコーディングを自動判別するようにしたければ auto-encoding を使うとよい。

Atom がエンコーディングを自動判別してくれない

Atom 1.3.2 は、ファイルを開いたときにファイルエンコーディングを自動判別してくれない。

before.png

つらい。

Ctrl + Shift + u という手があるが

Ctrl + Shift + u でエンコーディングを選べて、「Auto Detect」という選択肢があるのでこれで判別できるのだが、ファイルを開く都度 Ctrl + Shift + u を押すのはメンドクサイ。

デフォルトのエンコーディングを設定できるが

また、「File」メニューの「Settings」から「Core Settings」→「File Enconding」でデフォルトのエンコーディングを設定できるが、ここにはなぜか Auto Detect がない。

なぜだ。

auto-encoding が救う

そこで auto-encoding というパッケージが役に立つ。

その機能はズバリ「default "Auto Detect"」。

apm で簡単にインストールできる。

$ apm install auto-encoding

インストール後、ファイルを開きなおす。

after.png

嬉しい。

auto-encoding が Google 検索でイマイチ引っかかりにくいようで、存在に気づいていない人もいそうなので書きました。

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
89