GNOME Bugzilla – Bug 611677
Gedit incorrectly formatting text indentation
Last modified: 2010-05-14 07:53:29 UTC
In Ubuntu Intrepid deepspring reported: GEdit appears to be ignoring tab indentation in source code files. Refer to attached screenshot. On the left, GVim renders the source code correctly. One the right, GEdit ignores some of the tab indentation, incorrectly rendering the source code. Changing the formatting in GEdit to fix the problem results in an incorrect number of tabs being used for indentation. For example (using "_" as whitespace): ____def myfunction(somevar, somevar2): ________if somevar == somevar2: ____________print "The vars contents are the same" Looks like the following when the file is opened in nano, vi, gvim, emacs, editra (again using "_" for whitespace: ____def myfunction(somevar, somevar2): ______________if somevar == somevar2: ______________print "The vars contents are the same" Launchpad ref: https://bugs.edge.launchpad.net/ubuntu/+source/gedit/+bug/349187 Thanks
This is not a bug, this is simply a matter of having mixed tabs and spaces in a file, and having a different setting for the width rendering of a tab. You can modify the widh of a tab in the preferences dialog.