Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 12 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 just to add that this also works in case you had set indents to be represented by spaces rather than tabs. – Takkat Mar 22 '14 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 '14 at 17:06

Your Answer


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.