Re: The old pl/pgsql editor question back again

From: "Garcia, Joshua" <Joshua(dot)Garcia(at)xerox(dot)com>
To: "John DeSoi" <desoi(at)pgedit(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: The old pl/pgsql editor question back again
Date: 2006-08-04 22:11:52
Message-ID: E00A3B716AD4C84FB97E42367015E8A00BFF38@usa5911mf01.na.xerox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Aug 4, 2006, at 10:55 AM, Garcia, Joshua wrote:

>> - syntax highlighting that is smart enough to look akward when a
>> syntax
>> error is made. I think nedit does a pretty good job of this. emacs
>> syntax highlighting I've tried is pretty weak, but I really like
emacs
>> and use it a lot.

> This is pretty hard without a full blown parser.

Ya, I probably don't care about this one so much. No editor for
pl/pgsql I've seen so far does this. I've managed to go on pretty well
without it. I can probably live without it, but I think it's a really
useful feature.

>> - smart indention like emacs has in its c-mode. I've seen editors
>> have
>> no automatic/smart indention or the indention just doesn't work
>> properly
>> for pl/pgsql>

>Do you mean it automatically indents things? That is, it changes the
>indentation level for you? In a previous message you wrote:

>> indent .sql files the way nedit indents
>> them (which is indenting them at the same place of the line above
>> while retaining sql syntax highlighting)?

Hehe...you remembered that. I wanted emacs to indent like how nedit and
pgedit do, but it looks like I'd have to edit sql-mode or
sql-interactive-mode. I don't have time for that. :-(

> If I understand correctly, pgEdit does this (keeps the indentation
> Level of the previous line). But it does not try to guess a different

> indentation level of the next line based on the surrounding syntax.

Ya, exactly. pgEdit and nedit, unlike emacs, automatically keeps the
indentation of the previous line for .sql files. But having the
indentation work based on surrounding syntax I find to be really useful
because slight changes in code require irritating amounts of indentation
changes. Like I find I have to change conditional statements, now I
have to reformat a bunch of if statements or switch statements.

There are probably better uses of a developer's time than implementing
such features. But for me personally, just those two features save me
tons of time and effort. I think I just find readability of code to be
very valuable.

Josh

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Srinivas Iyyer 2006-08-06 00:45:38 pg_dump problem
Previous Message RPK 2006-08-04 17:50:50 Installing PostgreSQL without a service