Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using the Gedit text editor.

For a single line, we can simply press Backspace to remove the indentation on that particular line.

How can I select several lines and unindent them all?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can remove the tab space from multiple lines by selecting those lines and pressing Shift+tab. Shift+tab is used to give a reverse tab, i.e. tab in the opposite direction, so this should work almost wherever you want to reverse tab.

share|improve this answer
1  
+1 just to add that this also works in case you had set indents to be represented by spaces rather than tabs. –  Takkat Mar 22 at 18:12
    
You can also use <kbd>tab</kbd> to indent multiple lines with spaces (instead of tabs) -- if you enable the option to "Insert spaces instead of tabs". Kind of kludgy, but occasionally useful. –  nobar Nov 20 at 17:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.