man: add colophon to the end of each document.
[netsniff-ng.git] / bpf.vim
blobbb6322a5b57f009550789c7fbf956fa28080ed15
1 " Vim syntax file
2 " Language: Berkeley Packet Filter
3 " Maintainer: Daniel Borkmann
4 " Latest Revision: 08/16/2011
6 " In order to make syntax highlighting for BPFs work in vim, copy this file
7 " to ~/.vim/syntax/ and activate it in vim by entering:
9 "    :set syntax=bpf
11 " If you want to automatically load the BPF syntax highlighting for *.bpf 
12 " files create the ~/.vim/filetype.vim with the following content:
14 "    my filetype file
15 "    if exists("did_load_filetypes")
16 "      finish
17 "    endif
19 "    augroup filetypedetect
20 "      au! BufRead,BufNewFile *.bpf  setfiletype bpf
21 "    augroup END
24 if exists("b:current_syntax")
25   finish
26 endif
28 syn keyword bpfTodo contained TODO FIXME XXX NOTE
29 syn keyword bpfKeywords ldb ldh ld ldi ldx ldxi ldxb st stx jmp ja jeq jneq jne skipwhite
30 syn keyword bpfKeywords jlt jle jgt jge jset add sub mul div mod neg and or xor skipwhite
31 syn keyword bpfKeywords lsh rsh ret tax txa skipwhite
33 syn match bpfLabel /[a-zA-Z0-9_]\+/
34 syn match bpfSpChar /[:,#\[\]\(\)+*&]\?/ contains=bpfNumber,bpfLabel
35 syn match bpfNumber /\(0[xX]\x\+\|\d\+\)/
36 syn match bpfComment ";.*$" contains=bpfTodo
38 hi def link bpfTodo Todo
39 hi def link bpfComment Comment
40 hi def link bpfKeywords Keyword
41 hi def link bpfLabel Type
42 hi def link bpfNumber Number
43 hi def link bpfSpChar Special
45 let b:current_syntax = "bpf"