6

I occasionally realise that I need to remove one level of indentation when coding (such as moving code out of loop). The problem is I end up with a bunch of lines all indented more than I want it to be and the only way to indent it the way I want is by manually deleting all the tab spaces.

Is there a way to do this automatically? I use a variety of text editors such as Geany, N++, gedit, and Code::Blocks so I would like a multi-program solution to this.

13

I need to remove one level of indentation when coding

I use a variety of text editors such as Geany, N++, gedit, and Code::Blocks

Notepad++

Select the lines you want to "unindent" and press shift+tab

Geany

Select the lines you want to "unindent" and press shift+tab or ctrl+u

gedit

Select the lines you want to "unindent" and press shift+tab

Codeblocks

Select the lines you want to "unindent" and press shift+tab

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.