Skip to content
Browse files

Also highlight a bif name if it's followed by /[0-9]

  • Loading branch information...
1 parent 5030828 commit 1df640889e34ef45b989e2b6266639f6574f3971 @oscarh committed
Showing with 6 additions and 6 deletions.
  1. +6 −6 syntax/erlang.vim
View
12 syntax/erlang.vim
@@ -63,11 +63,11 @@ syn match erlangRecord /#\w\+/
syn match erlangTuple /{\|}/
syn match erlangList /\[\|\]/
-syn match erlangAttribute /^-\%(vsn\|author\|copyright\|compile\|deprecated\|module\|export\|import\|behaviour\)(\@=/
-syn match erlangInclude /^-include\%(_lib\)\?(\@=/
-syn match erlangRecordDef /^-record(\@=/
-syn match erlangDefine /^-define(\@=/
-syn match erlangPreCondit /^-\%(ifdef\|ifndef\|endif\)(\@=/
+syn match erlangAttribute /^-\%(vsn\|author\|copyright\|compile\|deprecated\|module\|export\|import\|behaviour\) *(\@=/
+syn match erlangInclude /^-include\%(_lib\)\? *(\@=/
+syn match erlangRecordDef /^-record *(\@=/
+syn match erlangDefine /^-define *(\@=/
+syn match erlangPreCondit /^-\%(ifdef\|ifndef\|endif\) *(\@=/
syn match erlangType /^-\%(spec\|type\)[( ]\@=/
@@ -80,7 +80,7 @@ syn match erlangBitSize /:\@<=[0-9]\+/
syn match erlangBinary /<<\|>>/
" BIFS
-syn match erlangBIF /\%([^:0-9A-Za-z_]\|\<erlang:\)\@<=\%(abs\|apply\|atom_to_list\|binary_to_list\|binary_to_term\|check_process_code\|concat_binary\|date\|delete_module\|disconnect_node\|element\|erase\|exit\|float\|float_to_list\|garbage_collect\|get\|get_keys\|group_leader\|halt\|hd\|integer_to_list\|iolist_to_binary\|iolist_size\|length\|link\|list_to_atom\|list_to_binary\|list_to_existing_atom\|list_to_float\|list_to_integer\|list_to_pid\|list_to_tuple\|load_module\|make_ref\|monitor_node\|node\|nodes\|now\|open_port\|pid_to_list\|port_close\|port_command\|port_connect\|port_control\|pre_loaded\|process_flag\|process_info\|processes\|purge_module\|put\|register\|registered\|round\|self\|setelement\|size\|spawn\|spawn_link\|spawn_opt\|split_binary\|statistics\|term_to_binary\|throw\|time\|tl\|trunc\|tuple_to_list\|unlink\|unregister\|whereis\)(\@=/
+syn match erlangBIF /\%([^:0-9A-Za-z_]\|\<erlang:\)\@<=\%(abs\|apply\|atom_to_list\|binary_to_list\|binary_to_term\|check_process_code\|concat_binary\|date\|delete_module\|disconnect_node\|element\|erase\|exit\|float\|float_to_list\|garbage_collect\|get\|get_keys\|group_leader\|halt\|hd\|integer_to_list\|iolist_to_binary\|iolist_size\|length\|link\|list_to_atom\|list_to_binary\|list_to_existing_atom\|list_to_float\|list_to_integer\|list_to_pid\|list_to_tuple\|load_module\|make_ref\|monitor_node\|node\|nodes\|now\|open_port\|pid_to_list\|port_close\|port_command\|port_connect\|port_control\|pre_loaded\|process_flag\|process_info\|processes\|purge_module\|put\|register\|registered\|round\|self\|setelement\|size\|spawn\|spawn_link\|spawn_opt\|split_binary\|statistics\|term_to_binary\|throw\|time\|tl\|trunc\|tuple_to_list\|unlink\|unregister\|whereis\)\((\|\/[0-9]\)\@=/
syn match erlangBif /\<\%(erlang:\)\@<=\%(append_element\|bump_reductions\|cancel_timer\|demonitor\|display\|error\|fault\|fun_info\|fun_to_list\|function_exported\|get_cookie\|get_stacktrace\|hash\|hibernate\|info\|is_builtin\|loaded\|localtime\|localtime_to_universaltime\|localtime_to_universaltime\|make_tuple\|md5\|md5_init\|md5_update\|memory\|monitor\|monitor_node\|phash\|phash2\|port_call\|port_info\|port_to_list\|ports\|process_display\|raise\|read_timer\|ref_to_list\|resume_process\|send\|send_after\|send_nosuspend\|set_cookie\|spawn_monitor\|start_timer\|suspend_process\|system_flag\|system_info\|system_monitor\|trace\|trace_delivered\|trace_info\|trace_pattern\|universaltime\|universaltime_to_localtime\|yield\)(\@=/
syn match erlangBif /erlang\(:\w\)\@=/
" }}}

0 comments on commit 1df6408

Please sign in to comment.
Something went wrong with that request. Please try again.