1

I wonder if we can force notepad++ to respect the previous whitespace character when it autoindents a new line:

list[CR][LF]
····item1[CR][LF]
····item2[CR][LF]
--->|

(notepadd++ screenshot recreation showing hidden characters, because I don't have enough reputation to post images, sorry xP)

If I am indenting with tabs I want a tab when notepad++ does an autoindent.

But if I am indenting with spaces, I do want spaces.

0

Just to make sure, I understand your question correctly. You want to prevent Notepad++ from inserting a Tab as soon as you press Enter/Return key, as a result of auto-indentation.

To achieve this, all you need to do is set the "Replace by space" in Tab settings. This option is available in Settings->Preferences->Tab Settings.

Notepadd++ Tab Settings

Note: Once you turn on the "Replace by space" switch, you will no more be able to key-in tabs. All your tabs will be converted to spaces. Number of spaces is controlled by the "Tab Size" (4 spaces, as per the screenshot above). When you open an already existing file, the Tabs will still be displayed as Tabs, they are not converted to spaces.

  • Not exactly. I want notepad++ to be smart and be able to chose 'tab' or 'space' indentation on the fly. According to the previous line. – daVe Aug 21 '14 at 2:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.