Sunday, June 15, 2014

How to indent quickly Java code in notepad++

If you copied some java code from a pdf into Notepad++ it's highly probable that the original code indentation is lost.
How to make the java code look pretty again?
In Eclipse there is the keystroke CRTL+SHIFT+F but in Notepad++ there no such a thing, fortunately Notepad++ has a lot of plugins  :)
 
Choose Plugins-> Plugin manager -> Show plugin manager and install the plugin TextFX.

Restart Notepad++ then, select your ugly code and choose TextFX-> TextFX Edit -> Reindent C++ Code.

That's it.
Since java and C++ have similar syntax the indentation works just fine :)


2 comments:

Your comment will be visible after approval.