How do I tell Notepad ++ that the string is exactly the same as before pressing Enter?

I use Notepad ++ to write PHP, and I find a way to not have the same indentation as before Enter, which is pretty troubling. Say I have a block of code like this:

    foreach()
    {
        if()
        {
        }
    }

If you move the pointer to the beginning of the if () line and press Enter, this line will be indented, such as the foreach () line

    foreach()
    {

    if()
        {
        }
    }

How can I point Notepad ++ to automatic indentation code like this?

    foreach()
    {

        if()
        {
        }
    }
+5
source share
2 answers

Press the key Homeand the carriage will be moved between the last space / tab and the letter i. Now, if you click Enter, a new line appears with an if statement that retains its indentation level.

Home, , , . . , .

+2

stackoverflow.

, .

Notepad ++

+1

All Articles