3
2

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.

Atomで拡張子とシンタックスを関連付けする

Posted at

atomでrubyファイルを開くとrailsのsyntax colorとなっていたのだが、ある日突然単純なrubyのsyntax colorに変わってしまった。

原因がわからなかったが、.atom/config.csonのcustomFileTypesを追記すれば強制的に拡張子との紐付けができた。

.atom/config.cson
"*":
  core:
    customFileTypes:
      'source.ruby.rails': [ //syntax
        'rb'//拡張子名
      ]

syntaxの調べ方はSettings -> Packages にてruby on railsのように調べたい言語で検索する
image.png

Settingsに入り、Scopeの部分で確認できる。

image.png

参考サイト

[ATOM Basic Customization]
(https://flight-manual.atom.io/using-atom/sections/basic-customization/#finding-a-languages-scope-name)

ATOM Editor で拡張子に言語を関連付ける

3
2
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
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?