Port to nano/pico #13
Copy link
Copy link
Open
Labels
Description
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.

I think i will finish porting tonight.
Instructions of developing Pico Syntax
- Create a
*.nanorcfile defining syntax highlighting. - Copy this file to
/usr/share/nano/and to~/.nano/syntax/(the first path should also contains.nanorcfiles 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). - Add this path to these files by creating/editing
~/.nanorcdoingnano ~/.nanorcand addinclude /usr/share/nano/*.nanorc. - 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)
Reactions are currently unavailable
Activity
ababaian commentedon Jan 4, 2018
Looks great @Ebedthan, can you start a git-branch called
nanowhile 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.Ebedthan commentedon Jan 4, 2018
ok @ababaian
7 remaining items
Ebedthan commentedon Jan 9, 2018
Hey @ababaian
Yes i have instructions.
First you need to create a
*.nanorcfile defining syntax highlighting.Secondly you need to copy this file to
/usr/share/nano/and to~/.nano/syntax/(the first path should also contains.nanorcfiles 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
~/.nanorcdoingnano ~/.nanorcand addinclude /usr/share/nano/*.nanorc.After that you will be able to see colors in your nano/pico editor.
ababaian commentedon Jan 9, 2018
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 👍
Ebedthan commentedon Jan 10, 2018
ok @ababaian
Ebedthan commentedon Jan 12, 2018
Hello everybody,
I have create the
nanobranch. Add fasta and fastq.nanorc files. Follow instructions above in the first comment to test it on your computer.ababaian commentedon Jan 16, 2018
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?
Ebedthan commentedon Jan 16, 2018
Yes @ababaian i have uploaded works i'vé already finish on the nano branch. Take a look. I will upload guidelines today.
Ebedthan commentedon Jan 17, 2018
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.
Ebedthan commentedon Jan 17, 2018
Some helpful links
https://gist.github.com/mattcurrycom/9d692d5dbb758e0724881e2c4fb03ef4
https://github.com/AbhishekGhosh/nano-syntax-highlighting-iNano-/
https://askubuntu.com/questions/90013/how-do-i-enable-syntax-highlighting-in-nano
Ebedthan commentedon Jan 23, 2018
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.
ababaian commentedon Jan 23, 2018
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
lessonly 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.alyeffy commentedon May 9, 2018
#2 task 8