" Vim syntax file " Language: Erlang " Maintainer: Oscar Hellström " URL: http://oscar.hellstrom.st " Version: 2010-08-09 " ------------------------------------------------------------------------------ " {{{1 " Options: " " Erlang BIFs " g:erlangHighlightBif - highlight erlang built in functions (default: off) " " }}} " ----------------------------------------------------------------------------- " Setup {{{1 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " Erlang is case sensitive syn case match " Match groups {{{1 syn match erlangStringModifier /\\./ contained syn match erlangStringModifier /\~\%(-\?[0-9*]\+\)\?\%(\.[0-9*]\+\..\?\)\?\%(c\|f\|e\|g\|s\|w\|p\|W\|P\|B\|X\|#\|b\|+\|n\|i\)/ contained syn match erlangModifier /\$\\\?./ syn match erlangInteger /\<\%([0-9]\+#[0-9a-fA-F]\+\|[0-9]\+\)\>/ syn match erlangFloat /\<[0-9]\+\.[0-9]\+\%(e-\?[0-9]\+\)\?\>/ syn keyword erlangTodo TODO FIXME XXX contained syn match erlangComment /%.*$/ contains=@Spell,erlangTodo syn keyword erlangKeyword band bor bnot bsl bsr bxor div rem xor syn keyword erlangKeyword try catch begin receive after cond fun let query syn keyword erlangConditional case if of end syn keyword erlangConditional not and or andalso orelse syn keyword erlangConditional when syn keyword erlangBoolean true false syn keyword erlangGuard is_list is_alive is_atom is_binary is_bitstring is_boolean is_tuple is_number is_integer is_float is_function is_constant is_pid is_port is_reference is_record is_process_alive syn match erlangOperator /\/\|*\|+\|-\|++\|--/ syn match erlangOperator /->\|<-\|||\||\|!\|=/ syn match erlangOperator /=:=\|==\|\/=\|=\/=\|<\|>\|=<\|>=/ syn keyword erlangOperator div rem syn region erlangString start=/"/ end=/"/ skip=/\\/ contains=@Spell,erlangStringModifier syn match erlangVariable /\<[A-Z_]\w*\>/ syn match erlangAtom /\%(\%(^-\)\|#\)\@\%(\s*[(:]\)\@!/ syn match erlangAtom /\\\@/ syn match erlangBitSize /:\@<=[0-9]\+/ syn match erlangBinary /<<\|>>/ " BIFS syn match erlangBIF /\%([^:0-9A-Za-z_]\|\