Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Shirley Wang <swang(at)pivotal(dot)io>
Cc: Robert Eckhardt <reckhardt(at)pivotal(dot)io>, Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>, Chethana Kumar <chethana(dot)kumar(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: Allow user to Comment/Uncomment code in query editor
Date: 2017-07-21 20:53:08
Message-ID: CA+OCxoxdCsRaQ7zfjstxfyRHiv=tgL61aFaPCg=MCkJ-mgBqsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Fri, Jul 21, 2017 at 8:57 PM, Shirley Wang <swang(at)pivotal(dot)io> wrote:

> Until we learn definitively from users that the current implementation of
> commenting/uncommenting in other tools is not working, we should use what
> is common practice. We can use that as a baseline and then if we learn that
> there needs to be another shortcut, we can add additional functionality.
> It's much easier to add something for users than to take away.
>

There isn't really any common practice as far as I can see. In a 20 minute
search I found the following variations (substitute Ctrl for Cmd on
non-Mac):

Tools supporting only one comment mode:

XCode: Cmd+/
Visual Studio: Ctrl+K+C Ctrl+K+U
SQL Server Management Studio: Ctrl+K+C Ctrl+K+U
pgAdmin 3: Cmd+K/Cmd+Shift+K
Editra: Cmd+1
Netbeans: Cmd+Shift+C
Eclipse: Cmd+/
Sublime Text: Cmd+/ Cmd+Shift+/
Toad: Ctrl+b Ctrl+Shift+b
MySQL Workbench: Cmd+/

Tools supporting line and block comment modes:

PyCharms (line comment): Cmd+/
PyCharms (block comment): Cmd+Alt+/
Notepad++ (line comment): Ctrl+q
Notepad++ (block comment): Ctrl+Shift+q

I'd say we should go with Cmd+/ and Cmd+Shift+/ as that seems the most
common by a small margin - however, I'm still not convinced that we don't
need two keys for optimal behaviour of line commenting.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-07-21 20:56:25 Re: pgAdmin 4 v1.6 Released!
Previous Message Pawel Hadam 2017-07-21 20:52:49 Re: pgAdmin 4 v1.6 Released!