Nano context highlighting for gmi file

1. Pete D. (peteyboy (a) SDF.ORG)

So, to make it more pleasant to write gmi files in shell, I created a 
very simple "gemini.nanorc" file for text highlighting gemini files.

I figure I'd just paste the file's contents and instructions here:
Just open a new file in nayno (I assume that's what you are using if you 
are going to use this feature), paste all the text between the two ``` 
lines below into the file, and save as "gemini.nanorc", either in 
/usr/local/share/nano (if you are admin), ~/share/nano or whatever is 
right for your installation.

Then, again, depending on your installation, create or append to your 
existing /etc/nanorc or ~/.nanorc a line like the following:

include "/etc/nanorc/gemini.nanorc"

Hope it's useful for somebody! Here's the contents:

 ```
## Here is an example for the gemini web scheme's gmi file format

syntax gemini "\.(gmi|GMI)$"

# links
color magenta "^=>.*$"u

# preformatted
color yellow  start="^```* ?$" end="^```* ?$"

#headings
color cyan "^\#+.*$"

#bullets
color green "^\*+.*$"
 ```
--
peteyboy at sdf.org
SDF Public Access UNIX System - http://sdf.org

Link to individual message.

2. Pete D. (peteyboy (a) SDF.ORG)


Oops, I messed that up. The word "gemini" needs to be in quotes on line 2 
of the file. It should be:

syntax "gemini" "\.(gmi|GMI)$"

Here's the whole thing again:


  So, to make it more pleasant to write gmi files in shell, I created a
  very simple "gemini.nanorc" file for text highlighting gemini files.

  I figure I'd just paste the file's contents and instructions here:
  Just open a new file in nano (I assume that's what you are using if you
  are going to use this feature), paste all the text between the two ```
  lines below into the file, and save as "gemini.nanorc", either in
  /usr/local/share/nano (if you are admin), ~/share/nano or whatever is
  right for your installation.

  Then, again, depending on your installation, create or append to your
  existing /etc/nanorc or ~/.nanorc a line like the following:

  include "/etc/nanorc/gemini.nanorc"

  Hope it's useful for somebody! Here's the contents:

  ```
  ## Here is an example for the gemini web scheme's gmi file format

  syntax "gemini" "\.(gmi|GMI)$"

  # links
  color magenta "^=>.*$"

  # preformatted
  color yellow  start="^```* ?$" end="^```* ?$"

  #headings
  color cyan "^\#+.*$"

  #bullets
  color green "^\*+.*$"
  ```
  --
  peteyboy at sdf.org
  SDF Public Access UNIX System - http://sdf.org

--
peteyboy at sdf.org
SDF Public Access UNIX System - http://sdf.org

Link to individual message.

3. solderpunk (solderpunk (a) SDF.ORG)

Thanks for sharing this, Peteyboy!

Have you seen the nano highlighting at:

https://github.com/yzzyx-network/nanorc/blob/master/gemini.nanorc

?  Just thought I'd point you at it in case it gave you any ideas (I
haven't tested it, no idea if it actually works).  I'm just guessing,
but I think it colours links differently depending on whether or not
they have a label or are just a URL?  Looks like there is a difference
in how it detects pre-formatted content, too.  No idea what, though.

Cheers,
Solderpunk

Link to individual message.

---

Previous Thread: Some notes from the tildeverse

Next Thread: Possibly silly text/gemini spec suggestion: Frames