7
7

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.

IntelliJ IDEAで選択した範囲を1キーでカッコ・クオート括りする設定

Posted at

ある範囲をカッコやクオートで括りたいとき、括りたい部分の先頭にカーソルを持って行って括る文字を入力し、末尾にカーソルを持って行って括る文字を入力する、というのが一般的な入力方法かと思います。
IntelliJ IDEAをお使いの場合、下記設定を有効にすると、もう少しだけ楽になれます。

Settingsの、 Editor → General → Smart Keysにある、「Surround selection on typing quote or brace」の設定がデフォルト無効になっているのですが、有効にしてみてください。

surround-selection.png

括りたい範囲を選択した状態で、カッコやクオート文字を1文字入力してみてください。
カッコやクオートで選択範囲を括るのが楽になります。
before.png
after.png

便利。その割にいつも設定を忘れるので、今後忘れないようにメモとして残しておきます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?