notepad++ and nppautoindent

stackoverflowpro picture stackoverflowpro · Jan 31, 2011 · Viewed 8.5k times · Source

I have installed the nppautoindent plugin into the notepad++ editor. I see no autoindenting effect. I am using PHP. Can some one help me get this to work?

Thanks

Answer

Malice picture Malice · Mar 1, 2011

What version of Notepad++ and NPPAutoIndent are you using? I'm using Notepad++ version 5.8.7 and NPPAutoIndent version 1.2. I'm not familiar with the way the plugin is supposed to work but I think I got the autoindenting to work.

First off, go to Settings->Preferences->Misc and ensure that Auto-indent is not ticked. Then go to Plugins->NPPAutoIndent and ensure Smart Indent is selected. Once that is done I get indentation like this when I press Return after each line:

function test() {
    return "Test";
}

This is what it looks like otherwise:

function test() {
return "Test";
}

I hope that helps.