Search code examples
intellij-ideakeyboard-shortcutsdouble-quotes

In code editor of IntelliJ, wrap selected text in double-quote marks


In the code editor for IntelliJ 2019, I want to add a straight double-quote (QUOTATION MARK) to the currently-selected text to make it a string literal.

Is there some keystroke or menu item to make this happen?


Solution

  • Yes, it's under Settings > Editor > General > Smart Keys and is called Surround selection on typing quote or brace.

    If activated, you can utilize this feature by simply selecting the relevant text and pressing the single or double quote key.

    Settings > Editor > General > Smart Keys