Thread: Suggested query editor improvements: Tabs and Indentation

Suggested query editor improvements: Tabs and Indentation

From
Date:
Hi,

I work really appreciate a few features in the query editor for Tabs and Indentation:

- Set whether indentation should use tab or spaces
- Set the tab width
- Set the spaces per indent
- Have an auto-indent scheme. One I enjoy using is indents to the first non-empty column. (I think the Scintilla
SCI_GETCOLUMNshould be able to help with this). 

Cheers
Jeremy

Jeremy

Re: Suggested query editor improvements: Tabs and Indentation

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> palmerj@xtra.co.nz
> Sent: 19 September 2006 23:57
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] Suggested query editor
> improvements: Tabs and Indentation
>
> Hi,
>
> I work really appreciate a few features in the query editor
> for Tabs and Indentation:
>
> - Set whether indentation should use tab or spaces
> - Set the tab width
> - Set the spaces per indent

Under File -> Options -> Query the is an indent characters option.

Set it to zero and you will get single tab indents.
Set it to a multiple of 8, and you will get N/8 tabs
Set it to any other number and you will get that many spaces.

I realise this is completely unintuitive but it might help you for now.
Doing it properly was on my list for this cycle but never got done. I
will look at it for the next release.

> - Have an auto-indent scheme. One I enjoy using is indents to
> the first non-empty column. (I think the Scintilla
> SCI_GETCOLUMN should be able to help with this).

Yes, that is also on my personal todo.

Regards, Dave

Re: Suggested query editor improvements: Tabs and

From
"Florian G. Pflug"
Date:
Dave Page wrote:
>> -----Original Message-----
>> From: pgadmin-hackers-owner@postgresql.org
>> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
>> palmerj@xtra.co.nz
>> Sent: 19 September 2006 23:57
>> To: pgadmin-hackers@postgresql.org
>> Subject: [pgadmin-hackers] Suggested query editor
>> improvements: Tabs and Indentation
>>
>> I work really appreciate a few features in the query editor
>> for Tabs and Indentation:
>>
>> - Set whether indentation should use tab or spaces
>> - Set the tab width
>> - Set the spaces per indent
>
> Under File -> Options -> Query the is an indent characters option.
>
> Set it to zero and you will get single tab indents.
> Set it to a multiple of 8, and you will get N/8 tabs
> Set it to any other number and you will get that many spaces.
>
> I realise this is completely unintuitive but it might help you for now.
> Doing it properly was on my list for this cycle but never got done. I
> will look at it for the next release.
Could you maybe add some text into that dialog that explains the behaviour?
Otherwise, nobody will understand why pgadmin suddenly uses spaces instead
of tabs or vice versa..
Of course, some indicator that tell if it's currently using tabs or spaces would
be even better ;-)

greetings, Florian Pflug

Re: Suggested query editor improvements: Tabs and Indentation

From
"Dave Page"
Date:

> -----Original Message-----
> From: Florian G. Pflug [mailto:fgp@phlo.org]
> Sent: 26 September 2006 18:41
> To: Dave Page
> Cc: palmerj@xtra.co.nz; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Suggested query editor
> improvements: Tabs and Indentation
>
> Could you maybe add some text into that dialog that explains
> the behaviour?
> Otherwise, nobody will understand why pgadmin suddenly uses
> spaces instead
> of tabs or vice versa..
> Of course, some indicator that tell if it's currently using
> tabs or spaces would
> be even better ;-)

Can you think of any wording? I'm not sure what'll fit on there.

Regards, Dave

Re: Suggested query editor improvements: Tabs and Indentation

From
"palmerj"
Date:
Hi Dave,

I know this is digging up something from the past, but is this still planned
for the next release? I don't see it on the development TODO list.

Thanks
Jeremy

> -----Original Message-----
> From: pgadmin-hackers-owner ( at ) postgresql ( dot ) org
> [mailto:pgadmin-hackers-owner ( at ) postgresql ( dot ) org] On Behalf Of
> palmerj ( at ) xtra ( dot ) co ( dot ) nz
> Sent: 19 September 2006 23:57
> To: pgadmin-hackers ( at ) postgresql ( dot ) org
> Subject: [pgadmin-hackers] Suggested query editor
> improvements: Tabs and Indentation
>
> Hi,
>
> I work really appreciate a few features in the query editor
> for Tabs and Indentation:
>
> - Set whether indentation should use tab or spaces
> - Set the tab width
> - Set the spaces per indent

Under File -> Options -> Query the is an indent characters option.

Set it to zero and you will get single tab indents.
Set it to a multiple of 8, and you will get N/8 tabs
Set it to any other number and you will get that many spaces.

I realise this is completely unintuitive but it might help you for now.
Doing it properly was on my list for this cycle but never got done. I
will look at it for the next release.

> - Have an auto-indent scheme. One I enjoy using is indents to
> the first non-empty column. (I think the Scintilla
> SCI_GETCOLUMN should be able to help with this).

Yes, that is also on my personal todo.

Regards, Dave



Re: Suggested query editor improvements: Tabs and Indentation

From
Dave Page
Date:
palmerj wrote:
> Hi Dave,
>
> I know this is digging up something from the past, but is this still planned
> for the next release? I don't see it on the development TODO list.

Hi Jeremy,

To be honest I completely forgot :-(. I've just committed a change to
allow you to select tabs or spaces, plus the width can now be specified
in a way that actually works as you would expect!

I haven't looked at auto indent yet - it seems it should be relatively
easy to implement even though wxSTC doesn't provide the capability itself.

Regards, Dave.

Re: Suggested query editor improvements: Tabs and Indentation

From
Dave Page
Date:
Dave Page wrote:
> I haven't looked at auto indent yet - it seems it should be relatively
> easy to implement even though wxSTC doesn't provide the capability itself.

Optionl auto-indent added, as well as optional indent guides.

Regards, Dave.