LoginSignup
19
12

More than 5 years have passed since last update.

PhpStormで選択した文字列をクオートで囲む

Last updated at Posted at 2017-03-03

PhpStormでプログラムを編集しているとき、ある文字列をシングルクオートなどで囲みたいことがよくあります。しかし、例えば次のような状態で、

abc

先頭にクオートを打ち込むと、補完されて

''abc

と2つ入ってしまいます。といって、文字列を選択した状態でクオートを打つと、

''

と消えてしまいます。そんな時、便利な設定がありました。

Surround selection on typing quote or brace

「File→Settings→Editor→General→Smart Keys」にある、「Surround selection on typing quote or brace」をチェックして「OK」をクリックしましょう。

Screen Shot 2017-03-15 at 17.27.14.png

この状態で、文字列を選択してクオートやかっこなどを打ち込むと、選択した文字列の前後に入力されるようになります。便利です。

19
12
3

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
19
12