0
votes

I often use Ctrl+Shift+F in Eclipse to format Java source code.

However in some situations I would like that some portions of code were not formatted, e.g. some long CLI commands inside comments.

So, I would like to tell Eclipse: "whenever I hit Ctrl+Shift+F, please format all lines of code except for x-y-z".

Is it possible?

For what language? It matters. - nitind
Sorry! I am talking about Java, I will edit my post. - luca.vercelli
I don't think eclipse has "invert selection". Basically you can do it the other way round, just select lines that you need to format then Ctrl+Shift+F - Kenneth Ong
Please elaborate on your question properly and mention your triggering point to get the answer. - Lova Chittumuri