Select line by search arg?
Answered
Hey
I'm cleaning up code and I'd like to select all lines in the current file that have:
////!
In them and then delete them?
I'd also like to delete any empty lines at some point too?
How can I do it ?
Please sign in to leave a comment.
Hello!
You can use the Select All Occurrences option:
(or just make the initial selection of ////! and press Ctrl+Shift+Alt+J). And then press Ctrl+Y to remove the lines with selected code.
As for empty lines, you can try configuring options in File | Settings | Editor | Code Style | C/C++ | Blank Lines or using replace dialog in regexp mode with \n\n => \n.
More useful info: https://www.jetbrains.com/help/clion/working-with-source-code.html.