Can't delete Parenthesis in IntelliJ/Cursive

前端 未结 4 2375
旧时难觅i
旧时难觅i 2021-02-20 04:26

I\'m using IntelliJ/Cursive to write Clojure. I found out that the only way to erase parenthesis is to totally erase the content inside them, and only then, the parenthesis can

相关标签:
4条回答
  • 2021-02-20 05:11

    You can delete the parenthesis while remaining in structural editing mode by selecting/highlighting it first with your cursor or shift+arrow. You'll then need to manually remove the corresponding close parenthesis too.

    0 讨论(0)
  • 2021-02-20 05:12

    From the docs:

    Structural editing comes enabled for Clojure code by default. If you don't like it, you can turn it off at Settings→Editor→General→Smart Keys→Use structural editing. If you'd like to toggle it on and off quickly, you can use the widget in the status bar at the bottom of the screen, or you can use the Edit→Structural Editing→Toggle Structural Editing Style action. If you find yourself doing that a lot you can even assign a shortcut key to the action.

    0 讨论(0)
  • 2021-02-20 05:12

    Recently was moved to Edit > Structural Editing > Toggle Structural Editing Style

    0 讨论(0)
  • 2021-02-20 05:23

    There is another way to remove parenthesis, using the structural editing command "Splice Sexp". You can also use slurping and barfing to manipulate the parenthesis to the order that you want.

    0 讨论(0)
提交回复
热议问题