23
11

More than 5 years have passed since last update.

Emacs の ruby-mode でマジックコメントを自動挿入しない設定

Last updated at Posted at 2016-02-13

ファイルの1行目にマジックコメント

# -*- coding: utf-8 -*-

が自動挿入される設定は、

(setq ruby-insert-encoding-magic-comment nil)

で取り消すことができる。

設定する理由

Ruby 2.0 からデフォルトのスクリプトエンコーディングが UTF-8 に変更された
したがって、UTF-8 を用いて下位互換を考える必要のない Ruby スクリプトにはマジックコメントを入れる必要はない。

23
11
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
23
11