Now that you mention it, there's a small bug about this feature. Here's how to reproduce it:
Open a file and paste this code:
for (j=0;j<N;j++) {
if () {
}
if () {
}
}
with THIS indentation (the important thing is that the final "}" has no indentation, and the rest does). If you select the entire block and press tab, the final bracket "}" will not move. If you shift-tab until the matching bracket has the same indentation (in other words, if you shift-tab until the "for" line has no indentation), then it works: press tab and you'll see the entire block shifting, including the "}" that was previously missing.
I'm using 5.1 RC ANSI, but actually this bug has been around for a while. As far as I know, this bug might have been present since the first version of NPP. It's just so meaningless that I've actually never reported it, but now it has come to my mind. I don't think I'd ever waste my time fixing it if it took more than 5 minutes...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way to change the indetation on a block of text?
Yeah, highlight it and press tab (or shift+tab to decrease). It doesn't replace the text highlighted with a tab character like you might expect.
That's just too easy. Thanks for the response!
Now that you mention it, there's a small bug about this feature. Here's how to reproduce it:
Open a file and paste this code:
for (j=0;j<N;j++) {
if () {
}
if () {
}
}
with THIS indentation (the important thing is that the final "}" has no indentation, and the rest does). If you select the entire block and press tab, the final bracket "}" will not move. If you shift-tab until the matching bracket has the same indentation (in other words, if you shift-tab until the "for" line has no indentation), then it works: press tab and you'll see the entire block shifting, including the "}" that was previously missing.
I'm using 5.1 RC ANSI, but actually this bug has been around for a while. As far as I know, this bug might have been present since the first version of NPP. It's just so meaningless that I've actually never reported it, but now it has come to my mind. I don't think I'd ever waste my time fixing it if it took more than 5 minutes...
Damn, the forum has screwed up my indentation. Ok, I'll try it this way:
(tab) for (j=0;j<N;j++) {
(tab)(tab) if () {
(tab)(tab)(tab)
(tab)(tab)}
(tab)(tab)if () {
(tab)(tab)(tab)
(tab)(tab)}
}
It's not very clear, but I wouldn't know how I could write it otherwise, sorry.
Nevermind, copy-pasting it works ok to replay the bug
I think Notepad++ uses Scintilla to handle the indentation, you might want to report the bug there.