Warm tip: This article is reproduced from stackoverflow.com, please click
intellij-idea

Intellij: delete all blank space until next non-blank character

发布于 2020-04-10 16:05:24

There is no easier way to explain what I want to do than a picture: enter image description here

I would like to reduce the time it takes me to refactor HTML code by deleting all the white space behind (or before, doesn't matter that much) my caret until the next non-blank character, emphasized by the highlighted blue whitespace I would like to delete. I found a way to do this on vim, but I want to do this on Intellij.

Questioner
Bar Akiva
Viewed
93
Koyasha 2020-02-02 01:19

Try Ctrl+Alt+J (⌃⇧J on Mac) on the <a>... line to perform the 'Join Lines' action.

More information on the feature can be found here and here.