Intellij Java/Scala: Delete to delimiter? (like Emacs Paredit) -
Emacs is one of the terrible characteristics of "paredit" mode that is Lisp-like as well as other languages such as Java / X.
Is there any such action or keyboard shortcut in Intellij IDEA? Or how would I define a macro to do this?
I have a solution that works almost: Record Macro Sequence (Mac binding):
Then I'm tapping this macro with Ctrl-K, it works great, eg. (The vertical bar is the state of the carat when it is applied):
List ("first", "second", "third string", "fourth") => List ("first", "second", "third", "fourth")
{100, 200, {300 |, 400, 500}, 20} = & gt; {100, 200, {300}, 20}
A case I do not want to work in exactly the same way when I use brackets:
(1, 2, (3, | 4, 5), 6, 7, 8) = & gt; (1, 2, (3, 6, 7, 8)
Note that it removes the attached right-bracket, because it includes the brackets contained in the extension-selection If the expression is a string or a braces, then the extension-selection does not include right-handed quotation marks or brace.
If I knew how to expand-bracket without expanding, So this would be perfect, but I can live with whatever I am now I.
Comments
Post a Comment