On 29/08/2007, Alex Jones <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-08-29 at 12:06 +0100, Gustavo J. A. M. Carneiro wrote: > And how will this look e.g. to Python, which generally doesn't even like > tabs? Variable width tabs will likely cause havoc in Python programs... > > As Nick said, Python is just fine with tabs! > Now, if you did the exact same thing, but behind the scenes inserted > spaces instead of tab characters, then it would be nice. > > His GEdit plugin supports this, but it's a lossy conversion. When reading > back the 0x20s, you have to try to figure out what was supposed to be a tab, > and I'm sure you might get some false positives eventually, unless there's > something I'm missing.
No, you're exactly correct. If we look at the following text (in a monospaced font): a zzzz aa zzzz aaa zzzz aaaa zzzz aaaaa zzzz aaaaaa zzzz aaaaaaa zzzz I have no (easy) way of determining if the one space on the last line is being used for alignment or not. The plugin I've made for gedit which converts to and from the different formats understands this issue - a tab is never converted into just one space (it will shift the text in that column to the next multiple of N instead), and when converting spaces->tabs (using elastic tabstops) it assumes that any run of more than one space is being used for alignment purposes. It will be an issue for text that's converted using other tools though, but at the moment there's not a lot I can do about it. In practice it seems to work pretty well. > I really can't wait to get this functionality, it finally puts an end to > all of the nonsense over how many spaces there should be in a tab! Thanks - I'm working on it! :) _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list