patchGNU nano - Patches: patch #8601, PostgreSQL syntax highlighting

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8601: PostgreSQL syntax highlighting

Submitter:  Devrim Gündüz <devrimgunduz>
Submitted:  Wed 11 Feb 2015 08:21:18 PM UTC
   
 
Priority:  3 - Low Status:  Done
Privacy:  Public Assigned to:  bens
Open/Closed:  Closed Release:  None

Jump to the original submission

Wed 20 May 2015 07:00:20 PM UTC, comment #14: 

File (with another little tweak) has been added to SVN, r5226.  Thanks!

Benno Schulenberg <bens>
Group administrator
Sun 03 May 2015 10:11:45 PM UTC, comment #13: 

Ok, so let's do it that way.

Thanks for the review and patience!

Regards, Devrim

Devrim Gündüz <devrimgunduz>
Sun 03 May 2015 10:50:51 AM UTC, comment #12: 

I answered that question in comment #9.

Benno Schulenberg <bens>
Group administrator
Fri 01 May 2015 08:27:18 AM UTC, comment #11: 

Hi,

Why did you remove the "PostgreSQL parameters" part?

Regards, Devrim

Devrim Gündüz <devrimgunduz>
Sat 25 Apr 2015 07:11:14 PM UTC, comment #10: 

Attached is my version of the file.  Okay with you, Devrim?

(file #33787)

Benno Schulenberg <bens>
Group administrator
Thu 23 Apr 2015 07:27:11 PM UTC, comment #9: 

Hi Devrim,

This time I missed _your post.  :|

Ehm... Shouldn't the SQL keywords have start-of-word and end-of-word markers ("\<" and "\>") included?  (By the way, SYSTEM has a trailing |.)

I won't take the "PostgreSQL parameters" part -- I think it's a bit over the top.

Oh, and is the syntax name "sql" really apt?  Will it also (mostly) work for say MySQL?  If so, maybe additional header and magic expressions would be useful?

Benno Schulenberg <bens>
Group administrator
Thu 16 Apr 2015 10:46:41 AM UTC, comment #8: 

Hi Benno,

Apologies, I missed your previous comment. Just attached the new version.

Regards, Devrim



(file #33686)

Devrim Gündüz <devrimgunduz>
Thu 16 Apr 2015 07:51:50 AM UTC, comment #7: 

Ping?

Benno Schulenberg <bens>
Group administrator
Sun 08 Mar 2015 08:19:29 PM UTC, comment #6: 

Hello Devrim,

Please attach your latest version here (for ease of finding it, and... one never knows what will happen to github), so I can have a look and probably commit it to SVN.

Benno Schulenberg <bens>
Group administrator
Mon 23 Feb 2015 06:19:05 PM UTC, comment #5: 

Hi Benno,

Sorry for the late response.

RE: ordering: I wanted to do this in PostgreSQL way, so wanted to group related items together.

Re: Alphabetical order: Done, and fixed capitalization.

re: long lines: Done.

Re: PLs: Programming Languages: http://www.postgresql.org/docs/9.4/static/xplang.html

http://www.postgresql.org/docs/9.4/static/external-pl.html

Committed new version to git.

Regards, Devrim

Devrim Gündüz <devrimgunduz>
Mon 16 Feb 2015 08:35:37 PM UTC, comment #4: 

Hi Devrim,

Thanks for the update.  However... please allow me to nitpick: I find the order in which the various keywords are mentioned puzzling.  For example: "int2|smallint|int4|int...".  Only after looking at it three times do I realize that you have grouped them according to size.  I would group kind by kind, and the most important first: "integer|int|smallint|bigint|int2|int4|int8...".  It's much easier to see -- at least for me -- that each member of a group has been mentioned.  The same for "IF|WHILE|IS NULL...".  I would list this as "IF|THEN|ELSE|ELSEIF|WHILE|DO..." -- putting things together that belong together.  Again it's easier to see that each element has been mentioned.

When there is no clear order or grouping for things, then I would use alphabetical order.  For example: "exception|notice|raise|return".

And when breaking long lines, it would be nicer to break them at a "letter boundary".  So I would push "CAST" and "DATA|DATABASE" and "END" (and so on) to the next line.  It's okay to have some lines of a 100 or 120 or even 150 characters, but avoid more than that.

By the way, what are "PLs"?  Could you phrase that in a way that also makes a little sense to someone who doesn't know Postgres?

Benno Schulenberg <bens>
Group administrator
Mon 16 Feb 2015 12:12:47 PM UTC, comment #3: 

Hi Benno,

Thanks for the review.

I updated the file, based on your comments, and I also added new stuff like parameter names and PostgreSQL PLs. You can see it in:

https://github.com/devrimgunduz/nanorc-pgsql/blob/master/pgsql.nanorc

Thanks!

Regards, Devrim

Devrim Gündüz <devrimgunduz>
Sun 15 Feb 2015 08:41:01 PM UTC, comment #2: 

Hello Devrim,

Thanks for the file.  Some questions.  Why the | after "integer"?  That looks like a mistake.  And why the repetition of "enum" and "char"?  And is "boolchar" correct?  And why four lines, why not just one with "bool|char|enum|int|..."?

# Types.
color green "\<(int|int2|int4|int8|bigint|smallint|integer|)\>"
color green "\<(bool|char|enum|)\>"
color green "\<(char|varchar)\>"
color green "\<(boolchar|enum|)\>"

Oh, and there is one very long line.  It would be nicer to break that into three or four or five -- it's easier to edit and gives a better impression of the actual size of the thing.

Benno Schulenberg <bens>
Group administrator
Wed 11 Feb 2015 08:22:33 PM UTC, comment #1: 

For questions/comments/contributions, please visit https://github.com/devrimgunduz/nanorc-pgsql

Devrim Gündüz <devrimgunduz>
Wed 11 Feb 2015 08:21:18 PM UTC, original submission:  

nanorc-pgsql
============

This is the nanorc file for PostgreSQL.

For questions/comments/contributions, please visit https://github.com/devrimgunduz/nanorc-pgsq

Devrim Gündüz <devrimgunduz>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #33787:  pgsql.nanorc added by bens (3KiB - application/octet-stream)
file #33686:  pgsql.nanorc added by devrimgunduz (8KiB - application/octet-stream)
file #33053:  pgsql.nanorc added by devrimgunduz (2KiB - application/octet-stream)
file #33054:  README.md added by devrimgunduz (261B - text/x-markdown)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by devrimgunduz (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-20 bens StatusIn Progress Done
        Open/ClosedOpen Closed
    2015-04-25 bens Attached File- Added pgsql.nanorc, #33787
        Priority5 - Normal 3 - Low
        SummaryAdd PostgreSQL syntax support PostgreSQL syntax highlighting
    2015-04-16 devrimgunduz Attached File- Added pgsql.nanorc, #33686
    2015-02-16 bens SummaryAdd PostgreSQL Syntax Support for nano Add PostgreSQL syntax support
    2015-02-15 bens StatusNone In Progress
        Assigned toNone bens
    2015-02-11 devrimgunduz Attached File- Added pgsql.nanorc, #33053
        Attached File- Added README.md, #33054

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code