Search code examples
notepad++indentationcopy-pastelines-of-code

retain indentation relative to first line on multiple line copy & paste


Sorry if this has been answered already, but nothing's coming in on google or stack's search.

When I copy & paste multiple lines in Notepadd++, all the lines hold their relative indentation, but they don't relative to the first line.

Does anyone know a setting to make the the n+1 lines hold their indentation relative to the first line pasted?


Solution

  • I'm not sure if this is actually possible, not without a plugin anyway!

    You could use an auto-indentation plugin like the following: http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central

    A quick way to adjust indentation as well is to highlight the whole misaligned section and press Tab to move it all to the right, and press Shift + Tab if you want it all to move to the left!