LoginSignup
6
4

More than 5 years have passed since last update.

AtomでJSXファイルを扱う際にhtmlタグを補完させる方法

Posted at

Atomで拡張子が.jsxのファイルを扱う際、デフォルトではhtmlタグを入力してもtabで補完がされません。補完を有効にするには以下のようにします。

まず、emmentというパッケージをインストールします。

$ apm install emmet

Atom -> Keymapを選択するとkeymap.csonというファイルが開きます。
ファイルに以下の記述を追加します。

'atom-text-editor[data-grammar="source js jsx"]':
  'tab': 'emmet:expand-abbreviation-with-tab'

すると以下のように例えばdivと入力してtabを押すと<div></div>が補完されるようになります。

hello.gif

6
4
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
6
4