Disabling Indentation and Auto Closing Brackets in Notepad++

Right now Notepad++ is automatically adding closing brackets as well as automatically indenting my code. (PHP)

It's doing this differently from how the code I'm working with is indented.

Is there a way I can do the following?

  • Disable automatic indentation where it changes the indentation, but keep the indentation where it continues the existing? (so if I am indented 3 places and press enter, I'll be indented 3 places on the new line, but if I open a bracket, I'll STILL be indented 3 places)
  • Disable automatic bracket closing entirely

(I don't have any options under the auto-complete section checked).

2 Answers

First of all the automatic bracket completion is easy. Just go to Settings >> Preferences >> Auto Completion and uncheck the parentheses, brackets, and curly brackets from the list as shown in the following picture. This will stop auto completion of those brackets.

Uncheck braces

Second for the auto indentation, you will have to use a workaround. If you go into Settings >> Preferences >> MISC. you will find an option for auto indent. However in my experience that will not stop auto indentation for php. The workaround is a plugin called NppAutoIndent. You can download this from the plugin manager (Plugins >> Plugin Manager >> Show Plugin Manager). After you download it, go to Plugins >> NppAutoIndent and check Previous Line and make sure Ignore Language is unchecked. See the pitcure below for clarity.

enter image description here

I hope this helps you and if not feel free to comment! God Bless and have a great day!

3

Not sure why, but the settings in Auto-Complete were the culprit. Everything was unchecked, but checking them, closing the options, going back in and unchecking it (setting it back to how it was when I originally looked) solved it and it's behaving correctly now.

(Best guess is the UI was not reflecting the actual settings somehow.)

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like