Here's a simple syntax highlighting style for SMILES files. It supports three different colours for comments, the SMILES itself, and titles. If anyone has the necessary regexp-fu, it might be worth looking into highlighting different bracket levels in the SMILES string.
To use, save this file into vimfiles/syntax/smi.vim, and then use "set filetype=smi" to turn on the highlighting. To automatically do this for *.smi files, create a file vimfiles/ftdetect/smi.vim containing the line "autocmd BufRead,BufNewFile *.smi set filetype=smi".
I also looked into doing folding for such files, that is, to use any comment as a header and then fold the subsequent SMILES. This is a format I use for storing matched series, for example. It works (see foldexpr), but it's too slow for a large file, which defeats the purpose.
" Vim syntax file " Language: SMILES strings " Maintainer: Noel O'Boyle " Latest Revision: 16 June 2016 if exists("b:current_syntax") finish endif syn match smiTitle /\v\s+.*$/hs=s+1 syn match smiString "\v^\S*" nextgroup=smiTitle skipwhite syn match smiComment "\v^#.*$" let b:current_syntax = "smi" hi def link smiComment Comment hi def link smiString Identifier hi def link smiTitle Include
* As the Vim documentation says, apparently it's actually lexical highlighting, but everyone calls it syntax highlighting so...