Re: [gedit-list] elastic tabstops implemented in gedit
- From: "Nick Gravgaard" <me nickgravgaard com>
- To: "August Karlstrom" <fusionfive comhem se>
- Cc: gedit-list gnome org
- Subject: Re: [gedit-list] elastic tabstops implemented in gedit
- Date: Fri, 20 Jul 2007 09:52:50 +0200
On 18/07/07, August Karlstrom <fusionfive comhem se> wrote:
Nick Gravgaard skrev:
> 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 programmers have with indenting and
> aligning code, and I've pached gedit to implement it. I've also
> written a gedit plugin which can convert files between using elastic
> tabstops and using spaces.
>
> For more information, please see http://nickgravgaard.com/elastictabstops/
>
> I'd love to hear any feedback, and really love to see this
> functionality appear in gedit officially or in any other projects.
>
> Tell me what you think,
> Nick
I really don't see any problems with using tabs only for indentation.
Advantages:
1. Everyone can set their preferred tab width in the editor,
2. easier editing and maintained consistency as we insert and delete
complete indentation steps,
3. smaller source files.
Disadvantage: We can't do fancy formatting such as lining up parameters
and such. On the other this is not necessarily a disadvantage; if the
parameter list in your example:
int someDemoCode(int fred, int wilma);
is arranged as
int someDemoCode(
int fred,
int wilma);
as opposed to
int someDemoCode(int fred,
int wilma);
we only have to edit one line if the function needs to be renamed.
The main point is that making changes to a source file shouldn't require
a fancy editor or excessive editing of surrounding code.
The problem is that people inevitably do want to align parameters and
stuff. I used to argue like you against lining things up, but I think
that was only because I knew that people with different sized tab
settings would have problems and I didn't like spaces.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]