public inbox for [email protected]  
help / color / mirror / Atom feed
From: Raffi Holzer <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Autoformatting
Date: Tue, 14 Feb 2017 10:02:42 -0500
Message-ID: <CAF+OSJvuDCOKMihuR0-WoJekG+S9P+Dd8tM9Ukqan5dKnXcBcA@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxowyMCS4DJBWm1sN-iAudt05Bii88mbxu-SPXRAK35S7jA@mail.gmail.com>
References: <CAF+OSJsUY01H6T7EOKO+AzN9Rt-BekzxCWWP47jWGC+mSi2sPA@mail.gmail.com>
	<CA+OCxowyMCS4DJBWm1sN-iAudt05Bii88mbxu-SPXRAK35S7jA@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi Dave,
 When we were talking about auto formatting we were actually referring to a
single button press doing all of these things to a large block of text. The
use case here would be if you receive a large illegible query and paste it
into the query editor it would either automatically auto-format or you
would press a button and it would auto-format. We are trying to determine a
few things. One, are there preferred formatting guidelines and two, how
should this autoformatting be implemented? On a button press? Upon pasting
in the text?

On Tue, Feb 14, 2017 at 5:53 AM, Dave Page <[email protected]> wrote:

> Hi
>
> On Mon, Feb 13, 2017 at 9:35 PM, Raffi Holzer <[email protected]> wrote:
> > Hi Hackers,
> >  We are looking into auto formatting SQL text in the SQL editor. However,
> > some users have expressed that this can be done in different ways. Are
> there
> > preferences in this community fo rhow autoformatting should be done?
>
> I think that really depends on the specific feature being discussed.
> For example, auto-indentation is very handy, and whilst it (and most
> formatting features) should be configurable, I suspect many people
> will leave it turned on. On the other hand, something like
> auto-upper-casing of keywords may be either automatic, or shortcut
> initiated, e.g. hit Ctrl+U to upper-case the word under the cursor.
>
> Perhaps you should start by listing the specific features? For
> reference, here's what pgAdmin 3 had:
>
> * The auto-indent feature will automatically indent text to the same
> depth as the previous line when you press return.
> * Block indent text by selecting two or more lines and pressing the Tab
> key.
> * Block outdent text that has been indented using the current tab
> settings using Shift+Tab.
> * Comment out SQL by selecting some text and pressing the Control+K.
> * Uncomment SQL by selecting some text starting with a comment and
> pressing Control+Shift+K.
> * Shift the selected text to upper case by pressing Control+U.
> * Shift the selected text to lower case by pressing Control+Shift+U.
>
> pgAdmin 4 currently has:
>
> * Auto-indent (not currently possible to disable it)
>
> I'd definitely like to see the rest (and anything else that seems
> useful) added, and made configurable where appropriate. I suspect the
> only ones that should be truly automatic are auto-indent and and
> upper-casing of keywords.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
Raffi Holzer
Product Manager
Pivotal Labs


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Autoformatting
  In-Reply-To: <CAF+OSJvuDCOKMihuR0-WoJekG+S9P+Dd8tM9Ukqan5dKnXcBcA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox