elastic tabstops implemented for GTK

2007-07-12 Thread Nick Gravgaard
Hi everyone, I thought some of you might be interested in some work I did recently. I came up with an idea I call elastic tabstops which I think goes some way towards solving the problems we programmers have with indenting and aligning code, and I've implemented this in GTK. At the moment this exi

Re: elastic tabstops implemented for GTK

2007-07-12 Thread Philip Withnall
Wow, that's such a good idea; the implementation seems to solve the problems I've always had with tabs/spaces/alignment. Is the patch for GtkSourceView, or just gedit? If you want to get it into "GTK", then it should probably be aimed at GtkSourceView. (Which is used by both gedit and Anjuta.) We

Re: elastic tabstops implemented for GTK

2007-07-12 Thread Alex Jones
You are truly a legend. I'm all for making things easier for those who prefer to use proportional fonts. I love unicode! ℃… On Thu, 2007-07-12 at 23:39 +0200, Nick Gravgaard wrote: > Hi everyone, > > I thought some of you might be interested in some work I did recently. > I came up with an idea I

Re: elastic tabstops implemented for GTK

2007-07-12 Thread Nick Gravgaard
Thanks Philip, The patch is for gedit. Gedit wraps GtkSourceViewClass to make it's own GeditViewClass, which is what I've extended in this patch, so it should be pretty straight forward to create a new class which just subclasses GtkSourceView, implements the elastic tabstop functionality and noth

Re: elastic tabstops implemented for GTK

2007-07-13 Thread Nick Gravgaard
Thanks Alex, The proportional font stuff is really just a nice side effect - this idea has all sorts of nice implications. Off the top of my head, imagine a program like ls that outputs a list of directories and files. At the moment ls needs to be aware of the number of columns of the console to w

Re: elastic tabstops implemented for GTK

2007-08-28 Thread Alex Jones
Hi again, Nick On Fri, 2007-07-13 at 10:46 +0200, Nick Gravgaard wrote: > Thanks Alex, > > The proportional font stuff is really just a nice side effect - this > idea has all sorts of nice implications. Off the top of my head, > imagine a program like ls that outputs a list of directories and >

Re: elastic tabstops implemented for GTK

2007-08-28 Thread Nick Gravgaard
On 29/08/2007, Alex Jones <[EMAIL PROTECTED]> wrote: > > Hi again, Nick > > On Fri, 2007-07-13 at 10:46 +0200, Nick Gravgaard wrote: > Thanks Alex, > > The proportional font stuff is really just a nice side effect - this > idea has all sorts of nice implications. Off the top of my head, > imagin

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Gustavo J. A. M. Carneiro
Personally I think this is a terrible idea because it breaks compatibility with other editors. If each editor interprets tabs in its own way, then when you save a file from one editor and open in another one it will appear all wrong. And how will this look e.g. to Python, which generally doesn't

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Nick Gravgaard
On 29/08/2007, Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> wrote: > On Qua, 2007-08-29 at 07:42 +0200, Nick Gravgaard wrote: > > On 29/08/2007, Alex Jones <[EMAIL PROTECTED]> wrote: > > > > > > Hi again, Nick > > > > > > On Fri, 2007-07-13 at 10:46 +0200, Nick Gravgaard wrote: > > > Thanks Ale

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Alex Jones
On Wed, 2007-08-29 at 07:42 +0200, Nick Gravgaard wrote: > Does anyone know the process for getting the elastic tabstop > functionality into the official GTK branch? You should open a bug against GTK on GNOME Bugzilla: http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B Attach a patch agains

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Lieven van der Heide
I really like this concept. I haven't tried it myself yet, but it seems to work really well. I don't think we should immediately include it in gtk though, because it's not "proven" enough yet. If it turns out to be completely useless in the end, then it will only be bloat to gtk, which cannot be re

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Alex Jones
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

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Emmanuele Bassi
On Wed, 2007-08-29 at 07:42 +0200, Nick Gravgaard wrote: > > How is this coming along? Have you opened bugzilla issues on this yet? I > > really want to start using this! > > I've been busy recently with other stuff, so at the moment I'm still > hacking my gedit patch to turn it into a plugin. P

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Nick Gravgaard
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, Pyt

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Yeti
On Wed, Aug 29, 2007 at 01:38:36PM +0200, Nick Gravgaard wrote: > > The problem is that indenting is already broken regardless of whether > you use tabs or spaces. Tabs are broken because if you don't get the > size right things won't line up ("appear all wrong"), and spaces are > broken because y

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Yeti
Alex Jones wrote: > 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! The option to avoid tabs has been here since ever. Did it put an end to the tab size nonsense? What makes you think this option will?

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Nick Gravgaard
On 29/08/2007, David Nečas (Yeti) <[EMAIL PROTECTED]> wrote: > On Wed, Aug 29, 2007 at 01:38:36PM +0200, Nick Gravgaard wrote: > > > > The problem is that indenting is already broken regardless of whether > > you use tabs or spaces. Tabs are broken because if you don't get the > > size right things

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Nick Gravgaard
On 29/08/2007, David Nečas (Yeti) <[EMAIL PROTECTED]> wrote: > Alex Jones wrote: > > 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! > > The option to avoid tabs has been here since ever. > Did it put a

Re: elastic tabstops implemented for GTK

2007-08-29 Thread Kalle Vahlman
2007/8/29, Nick Gravgaard <[EMAIL PROTECTED]>: [snip] > But wouldn't it be nice to have the choice over how big your > indentation is without forcing it on anyone else? OTOH you are forcing anyone wishing to look at your code to have a suitable viewer. If you think about how source code is viewed

Re: elastic tabstops implemented for GTK

2007-08-30 Thread Yeti
On Wed, Aug 29, 2007 at 07:11:35PM +0200, Nick Gravgaard wrote: > On 29/08/2007, David Nečas (Yeti) <[EMAIL PROTECTED]> wrote: > > Alex Jones wrote: > > > 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 ta

Re: elastic tabstops implemented for GTK

2007-08-30 Thread Nick Gravgaard
On 30/08/2007, Kalle Vahlman <[EMAIL PROTECTED]> wrote: > 2007/8/29, Nick Gravgaard <[EMAIL PROTECTED]>: > [snip] > > But wouldn't it be nice to have the choice over how big your > > indentation is without forcing it on anyone else? > > OTOH you are forcing anyone wishing to look at your code to ha

Re: elastic tabstops implemented for GTK

2007-08-30 Thread Lieven van der Heide
I don't think there is much point in arguing whether this might or might not work. He said he already implemented it, so the best thing to do is just give it a try. If it turns out to work well, very good, if not, it's a pity, but nothing is lost by it. Discarding any idea upfront before even tryin

Re: elastic tabstops implemented for GTK

2007-08-30 Thread Kalle Vahlman
2007/8/30, Nick Gravgaard <[EMAIL PROTECTED]>: > On 30/08/2007, Kalle Vahlman <[EMAIL PROTECTED]> wrote: > > 2007/8/29, Nick Gravgaard <[EMAIL PROTECTED]>: > > [snip] > > > But wouldn't it be nice to have the choice over how big your > > > indentation is without forcing it on anyone else? > > > > O

Re: elastic tabstops implemented for GTK

2007-09-18 Thread Nick Gravgaard
Hi Alex, everyone On 29/08/2007, Alex Jones <[EMAIL PROTECTED]> wrote: > > Hi again, Nick > > On Fri, 2007-07-13 at 10:46 +0200, Nick Gravgaard wrote: > Thanks Alex, > > The proportional font stuff is really just a nice side effect - this > idea has all sorts of nice implications. Off the top o

Re: elastic tabstops implemented for GTK

2007-09-19 Thread Alex Jones
On Wed, 2007-09-19 at 08:14 +0200, Nick Gravgaard wrote: > I thought I'd drop you a mail to tell you that I've turned the gedit > patch into a proper plugin and made the following fixes: > > * Other chars than just \n can now terminate paragraphs > * Italic and bold characters are now handled pro

Re: elastic tabstops implemented for GTK

2007-09-19 Thread Nick Gravgaard
On 19/09/2007, Alex Jones <[EMAIL PROTECTED]> wrote: > On Wed, 2007-09-19 at 08:14 +0200, Nick Gravgaard wrote: > > I thought I'd drop you a mail to tell you that I've turned the gedit patch > > into a proper plugin and made the following fixes: > > > > * Other chars than just \n can now terminate

Re: elastic tabstops implemented for GTK

2007-09-23 Thread Andrew Cowie
On Wed, 2007-09-19 at 08:14 +0200, Nick Gravgaard wrote: > http://nickgravgaard.com/elastictabstops/#gedit Nick, does "convert files that use spaces for alignment" mean something along the lines of "when reading a file that uses spaces for alignment, algo

Re: elastic tabstops implemented for GTK

2007-09-24 Thread Nick Gravgaard
On 24/09/2007, Andrew Cowie <[EMAIL PROTECTED]> wrote: > On Wed, 2007-09-19 at 08:14 +0200, Nick Gravgaard wrote: > > http://nickgravgaard.com/elastictabstops/#gedit > > Nick, does > > "convert files that use spaces for alignment" > > mean something along the lines of > > "when read