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 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
add comment

2 Answers

up vote 4 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
add comment

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
add comment

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.