File: faidx.vim

package info (click to toggle)
biosyntax 1.0.0b-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,008 kB
  • sloc: sh: 876; javascript: 292; xml: 246; makefile: 52
file content (32 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
" Vim syntax file
" Language: faidx
" Filetypes: .fai, .faidx 
" Maintainer: bioSyntax
" Version: v0

if exists("syntax_on")
	syntax reset
	colorscheme bioSyntax
endif

" Robust Column Selection in Vim Syntax
" -- This logic can be extended for N columns
" -- To add highlighting to a column add it to the contains list (submatch)
syntax region chr matchgroup=chr start='^' end='\n' contains=chrStart
syntax region chrStart matchgroup=chrStart start='\t' end='\n\@=' contains=numeric2,submatch
syntax region numeric2 matchgroup=numeric2 start='\t' end='\n\@=' contains=Col4
syntax region Col4 matchgroup=Col4 start='\t' end='\n\@=' contains=Col5
syntax region Col5 matchgroup=Col5 start='\t' end='\n\@=' contains=Col6
syntax region Col6 matchgroup=Col6 start='\t' end='\n\@='

" Submatch Definitions
syntax match submatch '3' contained


" Highlighting / Theme Control
" =========================================================
highlight link Col4 numeric 
highlight link Col5 numeric
highlight link Col6 numeric

highlight submatch ctermfg=28