Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 Gedit to program C and CPP, and I've enabled auto indentation in Edit->Pref.

However, it still doesn't work. Is there anything I can do?

share|improve this question
up vote 6 down vote accepted

The auto indentation might not actually be what you think it is. It isn't "smart indentation;" it simply maintains the indentation on the next line. For example, if you were to have a line indented with four spaces, with auto indentation the next line will also have four spaces. Without auto indentation, the next line would return to the beginning.

share|improve this answer

You will need to manually indent the first line in a block of code that should be indented. Subsequent lines will automatically be indented by the same number of spaces or tabs as this first line.

Of course if you are already doing this, then you have uncovered a bug which should be reported!

share|improve this answer

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.