When pressing enter in Notepad++ to create a new line, is it possible to obtain the exact indentation of the previous line for the new line? No matter what I've tried, Notepad++ will always replace as many spaces as possible with tabs.
As an example, say I have the following (---> is a tab, . is a space, | is the cursor):
--->--->a_very_long_variable_name = another_long_name
--->--->..........................+ yet_another_variable|;
Lets say I want to add a third operand on a new line. After pressing Enter, I would expect the following:
--->--->a_very_long_variable_name = another_long_name
--->--->..........................+ yet_another_variable
--->--->..........................|;
Unfortunately, what Notepad++ actually produces is this:
--->--->a_very_long_variable_name = another_long_name
--->--->..........................+ yet_another_variable
--->--->--->--->--->--->--->--->..|;
Does anyone know of a setting or plugin that can be used to get an exact copy of the indentation, rather than replacing spaces by tabs?
It would also be nice if block indenting/unindenting would only affect the number of leading tabs, rather than again changing spaces to tabs.
I came across this question looking for something similar (working on multiple projects with different indentation styles), and thought I'd provide an answer for anyone else stumbling across this.
There's a nice plugin which makes Notepad++ keep indentation without doing any conversion, "TabIndentSpaceAlign": http://code.google.com/p/kereds-notepad-plus-plus-plugins/
Also available from the Notepad++ Plugin manager. Don't forget to enable the plugin after installing it! (see Plugins menu)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With