This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Syntax highlighting for PAML's control files in Vim

The programs from the PAML package by Ziheng Yang (1997, 2004) use a common input file format, containing parameters:

It's basically a list of key = value, and comments starts with an asterisk *:

Here is an short exerpt suited for the codeml program:

seqfile = myalignment.phy
treefile = mytree.nwk
model = 0  * possible values: 0: one omega for the tree; 1: one omega per branch (free-ratio model)

I wish there was some way to get a proper syntaxic coloration in Vim (for teaching purposes in addition to my own visual comfort). Therefore my question:

  • Is there an existing file type close to this one, recognized by Vim? Especially for the _asterisk comments_, does it exist somewhere else?

If there is some similar filetype, I could start from it to work out how to define a syntax file for Vim. Any suggestions?

paml vim

1 answer

Ok, I managed to put up this basic syntax plugin: https://github.com/Gullumluvl/vim-PAML.

Log in to answer this question.