Reformat Code in Notepad++ [duplicate]
Asked Answered
C

2

28

Is there a function (and shortcut) to reformat code in Notepad++

Like CTRL+SHIFT+F in Eclipse?

Curvy answered 16/11, 2011 at 11:51 Comment(0)
W
26

TextFX hasn't been updated for a long time. A more powerful choice is UniversalIndentGUI.

Wilber answered 25/2, 2014 at 10:17 Comment(4)
When you have no admin-rights, you should check this answerAdrenal
It's been a while since this thread was active, but I must say TextFX is -although not maintained any more for a very long time- one of the BEST plugins ever made for NPP. Despite its age, it's still fully functional which means the developer has been very keen in thinking a long time ahead with his plugin features. I needed to reformat C-source code and with TextFX it's a breeze...Inevasible
I agree with GeertVc. I will use IDEs for most programming, but when using Notepad++ (usually for C code) the whole point for me is to be using a lightweight editor. So in this case, I don't prefer "a more powerful" plugin, just one that's quick, simple, and light.Aftershaft
TextFX2 is now available. Install from the Plugin manager. Select TextFX Edit / Re-indent C++ code.Tooley
S
23

If you are working with C++ then you can use the TextFX features. Go to

TextFX->Edit->Reindent C++ code

And regarding shortcuts you can always modify your shortcuts for NPP by using

Settings->Shortcut mapper

in this case go to

Settings->Shortcut mapper->Plugin commands: #141 

and modify it to CTRL + SHIFT + F.

Sampler answered 17/11, 2011 at 11:56 Comment(5)
Thanks. I downloaded TextFX via the plugin manager. Actually I wanted to reformat Java code. Although it is called Reindent C++ code, it worked for my Java files. :-)Curvy
thanks for the saver alem :)Cornel
There is no TextFX menu item in version 7.9.1.Plumper
TextFX2 is now available. Install from the Plugin manager. Select TextFX Edit / Re-indent C++ code.Tooley
I installed TextFX, but there is no TextFX->Edit menu. Plenty of other options and tools under the TextFX menu, but no Edit submenu.Pronucleus

© 2022 - 2024 — McMap. All rights reserved.