ababaian / bioSyntax-archive

Syntax highlighting for computational biology
http://bioSyntax.org
GNU General Public License v3.0
16 stars 2 forks source link

Porting to vim #12

Closed Jwong684 closed 6 years ago

Jwong684 commented 7 years ago

This is a useful tutorial to get into vim syntax: http://vim.wikia.com/wiki/Creating_your_own_syntax_files

Enable syntax in ~/.vimrc:

syntax enable

There is essentially a vim folder in your home directory: Make these subdirectories:

In syntax/fasta.vim: (specifications)

if exists("syntax_on")
        syntax reset
endif

syntax match comment ">.*$"
syntax match ntA "A"
syntax match ntG "G"
syntax match ntC "C"
syntax match ntT "T"

hi def link comment Identifier
highlight ntA ctermfg=Black ctermbg=Green guibg=#272822
highlight ntG ctermfg=Black ctermbg=Yellow guibg=#FF8C00
highlight ntC ctermfg=Black ctermbg=Blue guibg=#2A0AFD
highlight ntT ctermfg=Black ctermbg=Red guibg=#FD0A0A

Something kept breaking when I followed the online tutorial so I broke it down to this skeleton for now. More to come.

fransilvion commented 7 years ago

Hey, Jasper, I am back in the action! What type of file formats have you already done for vim? Is it only fasta? I will focus on pdb, vcf and bed (or you've done this one already?) files for now. If you need any help, just ask

Jwong684 commented 7 years ago

Hey German,

I have also just started looking at this haha. I will do bed, since it seems relatively straightforward.

If you have any code pertaining to some useful regexp in vim, please share it on here. I think it would be more helpful to see your logic rather than rely on some variable forums on vim regexp.

Thank you!

Jasper

ababaian commented 7 years ago

vim-faidx @Jwong684 Vim Robust Column Selection is now solved: there might be another way to do using nextgroup= but we can worry about that if need be, this is good for now.

Faidx Column Selection Syntax

ababaian commented 7 years ago

Writing a 'theme' set for vim

Vim Syntax Language Manual

Jwong684 commented 7 years ago

adapting l/d colour schemes