User forums > Using Code::Blocks

Moving a block by tabs

(1/1)

Elena:
I apologize in advance if this seems an obvious or noob question, but is there any way to move a selected block of code back or forth by one or more tabs ?
Suppose I pasted a function block which was aligned to column zero into a class, where everything is shifted to the right by one tab. The only (annoying) solution I can see is adding manually a tab at beginning of every line, but I can't believe an easier method is not provided... Thx

blauzahn:
At least on Linux it works and has always worked ootb: select than indent or unindent by tab or shift-tab. For Windows: no idea.

Reasons within cb might be: You have changed some editor setting (tab or/and indent option) or a codeformatter nullifies that immediately.
Glancing at a few of your older posts suggests the former.

Elena:
Thanks, this works !
No, I didn't say that indenting/unindenting a selected block does not work, and I haven't changed the relevant settings. Just I didn't think it was so simple lol 😉

blauzahn:
Thanks for the quick feedback.

Navigation

[0] Message Index

Go to full version