0
0

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 3 years have passed since last update.

【PhpStorm】改行すると'}'が挿入されてしまうのをなくしたい

Posted at

背景

業務でPhpStormを利用しているが、たまにファイルによっては'{'の後に改行を入れると強制的に'}'が挿入され、'}'が二重になってしまう問題が発生していた。
(筆者がこの問題にあたったファイルは.tagで終わるファイル)

スクリーンショット 2022-03-01 16.36.05.png
スクリーンショット 2022-03-01 16.36.42.png

'{'を入力した時点で'}'ができるので、改行したときには挿入される必要ないのが、挿入されてしまうので困りもの。
消せばいいだけなのだが、毎回挿入されるとストレスになるので解消したときの方法を備忘録として。

原因と解消方法

PhpStormのスマートキー設定でEnterを押すと対となる'}'が挿入されるように設定されていたので、設定を解除する。

  1. PhpStorm > Preferences⌘ ,で環境設定を開く
  2. Editor > General > Smart Keysを開く
  3. Enterの中からinsert pair '}' のチェックボックスからチェックを外す

スクリーンショット 2022-03-01 16.51.08.png

これで改行したときに対となる'}'が挿入されなくなった。

もし同じ問題にあたった人は是非。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?