Skip to content

Port to nano/pico #13

Open
Open

Description

@Ebedthan

Hey everybody

I have choose to invest my last night in writing syntax highlighting for nano/pico. I an writing the manual for develop nano syntax highlighting.

Take a look at what i have done so far.
image
I think i will finish porting tonight.


Instructions of developing Pico Syntax

  1. Create a *.nanorc file defining syntax highlighting.
  2. Copy this file to /usr/share/nano/ and to ~/.nano/syntax/ (the first path should also contains .nanorc files by default for others languages such as php, perl, etc., they don't need to be copied to ~/.nanorc/ file but the following step should be done to see colors).
  3. Add this path to these files by creating/editing ~/.nanorc doing nano ~/.nanorc and add include /usr/share/nano/*.nanorc.
  4. After that you will be able to see colors in your nano/pico editor.

Syntaxes TODO for pico

  • Fasta (.fa) [Anicet]
  • Fastq (.fq) [Anicet]
  • Bed (.bed)
  • Clustal (.clustal)
  • GTF (.gtf)
  • PDB (.pdb)
  • VCF (.vcf)
  • SAM (.sam)

Activity

  1. ababaian commented on Jan 4, 2018

    @ababaian
    Member

    Looks great @Ebedthan, can you start a git-branch called nano while you're working on this so that things are not pushed to master (which is for releases). Once all core-nano syntaxes are finished we can merge the nano branch with master.

  2. Ebedthan commented on Jan 4, 2018

    @Ebedthan
    ContributorAuthor
  3. 7 remaining items

  4. Ebedthan commented on Jan 9, 2018

    @Ebedthan
    ContributorAuthor

    Hey @ababaian

    Yes i have instructions.
    First you need to create a *.nanorc file defining syntax highlighting.
    Secondly you need to copy this file to /usr/share/nano/ and to ~/.nano/syntax/ (the first path should also contains .nanorc files by default for others languages such as php, perl, etc., they don't need to be copied to ~/.nanorc/ file but the following step should be done to see colors).
    Thirdly you need to add path to these files by creating/editing ~/.nanorc doing nano ~/.nanorc and add include /usr/share/nano/*.nanorc.
    After that you will be able to see colors in your nano/pico editor.

  5. ababaian commented on Jan 9, 2018

    @ababaian
    Member

    KK Anicet, I've copied your instructions to the top of the post to organize the information a bit. Keep us all updated about your progress with the pico syntaxes or if you run into trouble 👍

  6. Ebedthan commented on Jan 10, 2018

    @Ebedthan
    ContributorAuthor
  7. Ebedthan commented on Jan 12, 2018

    @Ebedthan
    ContributorAuthor

    Hello everybody,
    I have create the nano branch. Add fasta and fastq.nanorc files. Follow instructions above in the first comment to test it on your computer.

  8. ababaian commented on Jan 16, 2018

    @ababaian
    Member

    Hows it coming along Anicet? Maybe one of the other @bioSyntax/devs can help out? This syntax format looks pretty tricky with the limitations. Have you found any good online guides on writing in-depth syntax files?

  9. Ebedthan commented on Jan 16, 2018

    @Ebedthan
    ContributorAuthor

    Yes @ababaian i have uploaded works i'vé already finish on the nano branch. Take a look. I will upload guidelines today.

  10. Ebedthan commented on Jan 17, 2018

    @Ebedthan
    ContributorAuthor

    Hey everybody

    I have finished with bed, fasta and fastq syntax. If anyone wants to help for the others files types it would be very nice.
    The limitations of colours is really a problem.

    image

    image

    image

  11. Ebedthan commented on Jan 23, 2018

    @Ebedthan
    ContributorAuthor

    Hey @ababaian, since Valid colors in nano are white, black, red, blue, green, yellow, magenta, cyan.
    And for foreground colors, the use of the prefix "bright" to get a stronger highlight are the only ways to define syntax highlighting, i have found difficult to define syntax for sam, gtf, pdb files for examples.

  12. ababaian commented on Jan 23, 2018

    @ababaian
    Member

    Can you add at minimum white text to the FASTQ PHRED score? Right now it's unreadable as is.

    Start with GTF before SAM/VCF/PDB which is the simplest from that list. Can you get a Robust Column Selection regular expressions defined, that's more important then all the color details.

    If you're able to write the logic in nano to arbitrarily select columns I'll be able to define a color scheme which works within the palette available. It may not be a perfect match but less only uses about 8 colors too and it works. When you can exploit 8 colors + bright + bg/fg selections you end up with lots of choices.

  13. self-assigned this
    on Jan 31, 2018
  14. alyeffy commented on May 9, 2018

    @alyeffy
    Member

    #2 task 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions