LoginSignup
1
2

More than 5 years have passed since last update.

Atom で JSX の閉じタグを自動入力する

Last updated at Posted at 2017-03-04

いちいち閉じタグ入力がめんどくさいんじゃーー!というとき。かつ react プラグインを使わないとき。

の autoclose-html を入れる。

標準設定だと html にしか効果がないので、jsx の時にも有効になるよう、keybindings の設定をする。

'atom-text-editor[data-grammar~="jsx"]':
  '>': 'autoclose-html:close-and-complete'

これで jsx 編集中 <View> と入力すると <View></View> になるように。

また vim-mode-plus を使っているなら、insert-mode だけで有効になるように

'atom-text-editor[data-grammar~="jsx"].vim-mode-plus.insert-mode':
  '>': 'autoclose-html:close-and-complete'

のようにする。

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