Created
August 29, 2012 05:26
-
-
Save dpyro/3507094 to your computer and use it in GitHub Desktop.
Vim syntax file for FASTA (fna)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: FASTA nucleotide sequences (fna) | |
" Maintainer: Sumant Manne <[email protected]> | |
" Latest Revision: 28 August 2012 | |
" Based on Luis-Miguel Rodriguez <[email protected]>'s fasta.vim syntax | |
if exists("b:current_syntax") | |
finish | |
endif | |
" defline | |
syn region fnaHeader start=+^>+ end=+\n+ oneline contains=fnaHeaderSym,fnaHeaderId | |
syn match fnaHeaderId +.*$+ contained | |
syn match fnaHeaderSym +^>+ contained | |
" comment | |
syn region fnaComment start=+^;+ end=+\n+ oneline | |
" sequence | |
syn region fnaSequence start=+^[^>;]+ end=+\n+ contains=fnaSeqMasked,fnaSeqN | |
syn match fnaSeqMasked +[a-z]+ contained | |
syn match fnaSeqN +[Nn]+ contained | |
hi def link fnaHeaderSym Operator | |
hi def link fnaHeaderId Function | |
hi def link fnaComment Comment | |
hi def link fnaSequence String | |
hi def link fnaSeqMasked Special | |
hi def link fnaSeqN Ignore | |
let b:current_syntax="fna" | |
" vim: ts=4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment