forked from aniani/vim
Updated runtime files.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2013 Mar 13
|
||||
" Last Change: 2013 Jun 06
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
||||
@@ -1,23 +1,32 @@
|
||||
" Vim syntax file
|
||||
" Language: Erlang (http://www.erlang.org)
|
||||
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
|
||||
" Former Maintainer: Kreąimir Marľić (Kresimir Marzic) <kmarzic@fly.srk.fer.hr>
|
||||
" Last Update: 2013-Mar-07
|
||||
" Last Update: 2013-Jun-01
|
||||
" License: Vim license
|
||||
" URL: https://github.com/hcs42/vim-erlang
|
||||
|
||||
" Acknowledgements: This script was originally created by Kresimir Marzic [1].
|
||||
" The script was then revamped by Csaba Hoch [2]. During the revamp, the new
|
||||
" highlighting style and some code was taken from the Erlang syntax script
|
||||
" that is part of vimerl [3], created by Oscar Hellström [4] and improved by
|
||||
" Ricardo Catalinas Jiménez [5].
|
||||
|
||||
" [1]: Kreąimir Marľić (Kresimir Marzic) <kmarzic@fly.srk.fer.hr>
|
||||
" [2]: Csaba Hoch <csaba.hoch@gmail.com>
|
||||
" [3]: https://github.com/jimenezrick/vimerl
|
||||
" [4]: Oscar Hellström <oscar@oscarh.net> (http://oscar.hellstrom.st)
|
||||
" [5]: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||
|
||||
" Customization:
|
||||
"
|
||||
" There are two optional sets of highlighting:
|
||||
" To use the old highlighting style, add this to your .vimrc:
|
||||
"
|
||||
" 1. The BIFs (built-in functions) are highlighted by default. To disable
|
||||
" this, put the following line in your vimrc:
|
||||
" let g:erlang_old_style_highlight = 1
|
||||
"
|
||||
" let g:erlang_highlight_bifs = 0
|
||||
" To highlight further module attributes, add them to
|
||||
" ~/.vim/after/syntax/erlang.vim:
|
||||
"
|
||||
" 2. To enable highlighting some special atoms, put this in your vimrc:
|
||||
"
|
||||
" let g:erlang_highlight_special_atoms = 1
|
||||
" syn keyword erlangAttribute myattr1 myattr2 contained
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
@@ -35,94 +44,108 @@ if version >= 600
|
||||
endif
|
||||
|
||||
" Comments
|
||||
syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo
|
||||
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
|
||||
syn match erlangCommentAnnotation /`[^']*'/ contained
|
||||
syn keyword erlangTodo TODO FIXME XXX contained
|
||||
syn match erlangComment '%.*$' contains=erlangCommentAnnotation,erlangTodo
|
||||
syn match erlangCommentAnnotation ' \@<=@\%(clear\|docfile\|end\|headerfile\|todo\|TODO\|type\|author\|copyright\|doc\|reference\|see\|since\|title\|version\|deprecated\|hidden\|private\|equiv\|spec\|throws\)' contained
|
||||
syn match erlangCommentAnnotation /`[^']*'/ contained
|
||||
syn keyword erlangTodo TODO FIXME XXX contained
|
||||
syn match erlangShebang '^#!.*'
|
||||
|
||||
" Numbers (minimum base is 2, maximum is 36.)
|
||||
syn match erlangNumberInteger '\<\d\+\>'
|
||||
syn match erlangNumberInteger '\<\%([2-9]\|[12]\d\|3[0-6]\)\+#[[:alnum:]]\+\>'
|
||||
syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
|
||||
syn match erlangNumberInteger '\<\d\+\>'
|
||||
syn match erlangNumberInteger '\<\%([2-9]\|[12]\d\|3[0-6]\)\+#[[:alnum:]]\+\>'
|
||||
syn match erlangNumberFloat '\<\d\+\.\d\+\%([eE][+-]\=\d\+\)\=\>'
|
||||
|
||||
" Strings, atoms, characters
|
||||
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
|
||||
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
|
||||
syn match erlangStringModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
|
||||
syn match erlangQuotedAtomModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
|
||||
syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
|
||||
syn region erlangString start=/"/ end=/"/ contains=erlangStringModifier
|
||||
syn region erlangQuotedAtom start=/'/ end=/'/ contains=erlangQuotedAtomModifier
|
||||
syn match erlangStringModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
|
||||
syn match erlangQuotedAtomModifier '\~\a\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' contained
|
||||
syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)'
|
||||
|
||||
" Operators
|
||||
syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
|
||||
syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
|
||||
" Operators, separators
|
||||
syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/'
|
||||
syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse
|
||||
syn match erlangBracket '{\|}\|\[\|]\||\|||'
|
||||
syn match erlangPipe '|'
|
||||
syn match erlangRightArrow '->'
|
||||
|
||||
" Separators
|
||||
syn match erlangSeparator '(\|)\|{\|}\|\[\|]\||\|||\|;\|,\|?\|#'
|
||||
syn match erlangRightArrow '->'
|
||||
" Atoms, function calls (order is important)
|
||||
syn match erlangAtom '\<\l[[:alnum:]_@]*' contains=erlangBoolean
|
||||
syn keyword erlangBoolean true false contained
|
||||
syn match erlangLocalFuncCall '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangBIF
|
||||
syn match erlangLocalFuncRef '\<\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@='
|
||||
syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*(\)\@=' contains=erlangComment
|
||||
syn match erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment
|
||||
|
||||
" Functions call
|
||||
syn match erlangFCall '\<\%(\a[[:alnum:]@]*\s*\.\s*\)*\a[[:alnum:]@]*\s*:\s*\a[[:alnum:]@]*\>'
|
||||
" Variables, macros, records
|
||||
syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*'
|
||||
syn match erlangMacro '??\=[[:alnum:]_@]\+'
|
||||
syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+'
|
||||
syn match erlangRecord '#\s*\l[[:alnum:]_@]*'
|
||||
|
||||
" Bitstrings
|
||||
syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\%(\%(\s\|\n\|%.*\n\)*-\%(\s\|\n\|%.*\n\)*\%(integer\|float\|binary\|bytes\|bitstring\|bits\|binary\|utf8\|utf16\|utf32\|signed\|unsigned\|big\|little\|native\|unit\)\)*' contains=erlangComment
|
||||
|
||||
" Constants and Directives
|
||||
syn match erlangDirective '-\%(behaviour\|behavior\|compile\|define\|else\|endif\|export\|file\|ifdef\|ifndef\|import\|include_lib\|include\|module\|record\|undef\|author\|copyright\|doc\|vsn\|on_load\|export_type\)\>'
|
||||
syn match erlangUnknownAttribute '-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment
|
||||
syn match erlangAttribute '-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\|export_type\)' contains=erlangComment
|
||||
syn match erlangInclude '-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment
|
||||
syn match erlangRecordDef '-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment
|
||||
syn match erlangDefine '-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment
|
||||
syn match erlangPreCondit '-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif\)\>' contains=erlangComment
|
||||
syn match erlangType '-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment
|
||||
|
||||
" Keywords
|
||||
syn keyword erlangKeyword after begin case catch cond end fun if let of query receive when try
|
||||
syn keyword erlangExtra true false
|
||||
syn keyword erlangKeyword after begin case catch cond end fun if let of query
|
||||
syn keyword erlangKeyword receive when try
|
||||
|
||||
|
||||
if !exists("g:erlang_highlight_bifs") || g:erlang_highlight_bifs == 1
|
||||
|
||||
" build-in-functions (BIFs)
|
||||
syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list binary_part binary_to_atom binary_to_existing_atom binary_to_float binary_to_integer bitstring_to_list binary_to_list binary_to_term bit_size byte_size check_old_code check_process_code concat_binary date delete_module demonitor disconnect_node element erase error exit float float_to_binary float_to_list garbage_collect get get_keys group_leader halt hd integer_to_binary integer_to_list iolist_to_binary iolist_size is_alive is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_number is_pid is_port is_process_alive is_record is_reference is_tuple length link list_to_atom list_to_binary list_to_bitstring list_to_existing_atom list_to_float list_to_integer list_to_pid list_to_tuple load_module make_ref max min module_loaded monitor monitor_node node nodes now open_port pid_to_list port_close port_command port_connect pre_loaded process_flag process_flag process_info process purge_module put register registered round self setelement size spawn spawn_link spawn_monitor spawn_opt split_binary statistics term_to_binary throw time tl trunc tuple_size tuple_to_list unlink unregister whereis
|
||||
|
||||
endif
|
||||
|
||||
|
||||
if exists("g:erlang_highlight_special_atoms") && g:erlang_highlight_special_atoms == 1
|
||||
|
||||
" Processes
|
||||
syn keyword erlangProcess creation current_function dictionary
|
||||
syn keyword erlangProcess group_leader heap_size high initial_call
|
||||
syn keyword erlangProcess linked low memory_in_use message_queue
|
||||
syn keyword erlangProcess net_kernel node normal priority
|
||||
syn keyword erlangProcess reductions registered_name runnable
|
||||
syn keyword erlangProcess running stack_trace status timer
|
||||
syn keyword erlangProcess trap_exit waiting
|
||||
|
||||
" Ports
|
||||
syn keyword erlangPort command count_in count_out creation in
|
||||
syn keyword erlangPort in_format linked node out owner packeting
|
||||
|
||||
" Nodes
|
||||
syn keyword erlangNode atom_tables communicating creation
|
||||
syn keyword erlangNode current_gc current_reductions current_runtime
|
||||
syn keyword erlangNode current_wall_clock distribution_port
|
||||
syn keyword erlangNode entry_points error_handler friends
|
||||
syn keyword erlangNode garbage_collection magic_cookie magic_cookies
|
||||
syn keyword erlangNode module_table monitored_nodes name next_ref
|
||||
syn keyword erlangNode ports preloaded processes reductions
|
||||
syn keyword erlangNode ref_state registry runtime wall_clock
|
||||
|
||||
" Reserved
|
||||
syn keyword erlangReserved apply_lambda module_info module_lambdas
|
||||
syn keyword erlangReserved record record_index record_info
|
||||
|
||||
" Extras
|
||||
syn keyword erlangExtra badarg nocookie
|
||||
|
||||
" Signals
|
||||
syn keyword erlangSignal badsig kill killed exit normal
|
||||
endif
|
||||
" Build-in-functions (BIFs)
|
||||
syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list contained
|
||||
syn keyword erlangBIF binary_part binary_to_atom contained
|
||||
syn keyword erlangBIF binary_to_existing_atom binary_to_float contained
|
||||
syn keyword erlangBIF binary_to_integer bitstring_to_list contained
|
||||
syn keyword erlangBIF binary_to_list binary_to_term bit_size contained
|
||||
syn keyword erlangBIF byte_size check_old_code check_process_code contained
|
||||
syn keyword erlangBIF concat_binary date delete_module demonitor contained
|
||||
syn keyword erlangBIF disconnect_node element erase error exit contained
|
||||
syn keyword erlangBIF float float_to_binary float_to_list contained
|
||||
syn keyword erlangBIF garbage_collect get get_keys group_leader contained
|
||||
syn keyword erlangBIF halt hd integer_to_binary integer_to_list contained
|
||||
syn keyword erlangBIF iolist_to_binary iolist_size is_alive contained
|
||||
syn keyword erlangBIF is_atom is_binary is_bitstring is_boolean contained
|
||||
syn keyword erlangBIF is_float is_function is_integer is_list contained
|
||||
syn keyword erlangBIF is_number is_pid is_port is_process_alive contained
|
||||
syn keyword erlangBIF is_record is_reference is_tuple length link contained
|
||||
syn keyword erlangBIF list_to_atom list_to_binary contained
|
||||
syn keyword erlangBIF list_to_bitstring list_to_existing_atom contained
|
||||
syn keyword erlangBIF list_to_float list_to_integer list_to_pid contained
|
||||
syn keyword erlangBIF list_to_tuple load_module make_ref max min contained
|
||||
syn keyword erlangBIF module_loaded monitor monitor_node node contained
|
||||
syn keyword erlangBIF nodes now open_port pid_to_list port_close contained
|
||||
syn keyword erlangBIF port_command port_connect pre_loaded contained
|
||||
syn keyword erlangBIF process_flag process_flag process_info contained
|
||||
syn keyword erlangBIF process purge_module put register registered contained
|
||||
syn keyword erlangBIF round self setelement size spawn spawn_link contained
|
||||
syn keyword erlangBIF spawn_monitor spawn_opt split_binary contained
|
||||
syn keyword erlangBIF statistics term_to_binary throw time tl contained
|
||||
syn keyword erlangBIF trunc tuple_size tuple_to_list unlink contained
|
||||
syn keyword erlangBIF unregister whereis contained
|
||||
|
||||
" Sync at the beginning of functions: if this is not used, multiline string
|
||||
" are not always recognized
|
||||
" are not always recognized, and the indentation script cannot use the
|
||||
" "searchpair" (because it would not always skip strings and comments when
|
||||
" looking for keywords and opening parens/brackets).
|
||||
syn sync match erlangSync grouphere NONE "^[a-z]\s*("
|
||||
let b:erlang_syntax_synced = 1
|
||||
|
||||
" Define the default highlighting. See ":help group-name" for the groups and
|
||||
" their colors.
|
||||
|
||||
let s:old_style = (exists("g:erlang_old_style_highlight") && g:erlang_old_style_highlight == 1)
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists ("did_erlang_inits")
|
||||
if version >= 508 || !exists("did_erlang_inits")
|
||||
if version < 508
|
||||
let did_erlang_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
@@ -130,46 +153,106 @@ if version >= 508 || !exists ("did_erlang_inits")
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
" erlang_characters
|
||||
" Comments
|
||||
HiLink erlangComment Comment
|
||||
HiLink erlangCommentAnnotation Special
|
||||
HiLink erlangTodo Todo
|
||||
HiLink erlangSeparator Normal
|
||||
HiLink erlangOperator Operator
|
||||
HiLink erlangRightArrow Operator
|
||||
|
||||
HiLink erlangStartString String
|
||||
HiLink erlangString String
|
||||
HiLink erlangStringModifier Special
|
||||
|
||||
HiLink erlangStartQuotedAtom Type
|
||||
HiLink erlangQuotedAtom Type
|
||||
HiLink erlangQuotedAtomModifier Special
|
||||
HiLink erlangShebang Comment
|
||||
|
||||
" Numbers
|
||||
HiLink erlangNumberInteger Number
|
||||
HiLink erlangNumberFloat Float
|
||||
HiLink erlangNumberHex Number
|
||||
|
||||
" Strings, atoms, characters
|
||||
HiLink erlangString String
|
||||
|
||||
if s:old_style
|
||||
HiLink erlangQuotedAtom Type
|
||||
else
|
||||
HiLink erlangQuotedAtom String
|
||||
endif
|
||||
|
||||
HiLink erlangStringModifier Special
|
||||
HiLink erlangQuotedAtomModifier Special
|
||||
HiLink erlangModifier Special
|
||||
|
||||
" erlang_functions
|
||||
HiLink erlangFCall Function
|
||||
" Operators, separators
|
||||
HiLink erlangOperator Operator
|
||||
HiLink erlangRightArrow Operator
|
||||
if s:old_style
|
||||
HiLink erlangBracket Normal
|
||||
HiLink erlangPipe Normal
|
||||
else
|
||||
HiLink erlangBracket Delimiter
|
||||
HiLink erlangPipe Delimiter
|
||||
endif
|
||||
|
||||
" Atoms, functions, variables, macros
|
||||
if s:old_style
|
||||
HiLink erlangAtom Normal
|
||||
HiLink erlangLocalFuncCall Normal
|
||||
HiLink erlangLocalFuncRef Normal
|
||||
HiLink erlangGlobalFuncCall Function
|
||||
HiLink erlangGlobalFuncRef Function
|
||||
HiLink erlangVariable Normal
|
||||
HiLink erlangMacro Normal
|
||||
HiLink erlangRecord Normal
|
||||
else
|
||||
HiLink erlangAtom String
|
||||
HiLink erlangLocalFuncCall Normal
|
||||
HiLink erlangLocalFuncRef Normal
|
||||
HiLink erlangGlobalFuncCall Normal
|
||||
HiLink erlangGlobalFuncRef Normal
|
||||
HiLink erlangVariable Identifier
|
||||
HiLink erlangMacro Macro
|
||||
HiLink erlangRecord Structure
|
||||
endif
|
||||
|
||||
" Bitstrings
|
||||
if !s:old_style
|
||||
HiLink erlangBitType Type
|
||||
endif
|
||||
|
||||
" Constants and Directives
|
||||
if s:old_style
|
||||
HiLink erlangAttribute Type
|
||||
HiLink erlangMacroDef Type
|
||||
HiLink erlangUnknownAttribute Normal
|
||||
HiLink erlangInclude Type
|
||||
HiLink erlangRecordDef Type
|
||||
HiLink erlangDefine Type
|
||||
HiLink erlangPreCondit Type
|
||||
HiLink erlangType Type
|
||||
else
|
||||
HiLink erlangAttribute Keyword
|
||||
HiLink erlangMacroDef Macro
|
||||
HiLink erlangUnknownAttribute Normal
|
||||
HiLink erlangInclude Include
|
||||
HiLink erlangRecordDef Keyword
|
||||
HiLink erlangDefine Define
|
||||
HiLink erlangPreCondit PreCondit
|
||||
HiLink erlangType Type
|
||||
endif
|
||||
|
||||
" Keywords
|
||||
HiLink erlangKeyword Keyword
|
||||
|
||||
" Build-in-functions (BIFs)
|
||||
HiLink erlangBIF Function
|
||||
|
||||
" erlang_keywords
|
||||
HiLink erlangDirective Type
|
||||
HiLink erlangKeyword Keyword
|
||||
HiLink erlangProcess Special
|
||||
HiLink erlangPort Special
|
||||
HiLink erlangNode Special
|
||||
HiLink erlangReserved Statement
|
||||
HiLink erlangExtra Statement
|
||||
HiLink erlangSignal Statement
|
||||
if s:old_style
|
||||
HiLink erlangBoolean Statement
|
||||
HiLink erlangExtra Statement
|
||||
HiLink erlangSignal Statement
|
||||
else
|
||||
HiLink erlangBoolean Boolean
|
||||
HiLink erlangExtra Statement
|
||||
HiLink erlangSignal Statement
|
||||
endif
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
||||
let b:current_syntax = "erlang"
|
||||
|
||||
" vim: sw=2 et
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
" Maintainer: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Website: http://github.com/steveno/vim-files/blob/master/syntax/falcon.vim
|
||||
" Credits: Thanks the ruby.vim authors, I borrowed a lot!
|
||||
" Thanks to the lisp authors for the rainbow code!
|
||||
" -------------------------------------------------------------------------------
|
||||
" GetLatestVimScripts: 2745 1 :AutoInstall: falcon.vim
|
||||
|
||||
" When wanted, highlight the trailing whitespace.
|
||||
if exists("c_space_errors")
|
||||
@@ -56,6 +56,7 @@ syn keyword falconBool true false
|
||||
|
||||
" Constants
|
||||
syn keyword falconConst PI E nil
|
||||
syn match falconConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!"
|
||||
|
||||
" Comments
|
||||
syn match falconCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||
@@ -116,6 +117,47 @@ syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ fold keepend
|
||||
syn region falconString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=falconStringDelimiter end=+^\s*\zs\z1$+ contains=falconStringEscape fold keepend
|
||||
|
||||
" Falcon rainbox to highlight parens in varying colors
|
||||
if exists("g:falcon_rainbow") && g:falcon_rainbow != 0
|
||||
syn region falconParen0 matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen1
|
||||
syn region falconParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen2
|
||||
syn region falconParen2 contained matchgroup=hlLevel2 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen3
|
||||
syn region falconParen3 contained matchgroup=hlLevel3 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen4
|
||||
syn region falconParen4 contained matchgroup=hlLevel4 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen5
|
||||
syn region falconParen5 contained matchgroup=hlLevel5 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen6
|
||||
syn region falconParen6 contained matchgroup=hlLevel6 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen7
|
||||
syn region falconParen7 contained matchgroup=hlLevel7 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen8
|
||||
syn region falconParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen9
|
||||
syn region falconParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@falconListCluster,falconParen0
|
||||
endif
|
||||
|
||||
" Setup the colors for the rainbox
|
||||
if exists("g:falcon_rainbow") && g:falcon_rainbow != 0
|
||||
if &bg == "dark"
|
||||
hi def hlLevel0 ctermfg=red guifg=red1
|
||||
hi def hlLevel1 ctermfg=yellow guifg=orange1
|
||||
hi def hlLevel2 ctermfg=green guifg=yellow1
|
||||
hi def hlLevel3 ctermfg=cyan guifg=greenyellow
|
||||
hi def hlLevel4 ctermfg=magenta guifg=green1
|
||||
hi def hlLevel5 ctermfg=red guifg=springgreen1
|
||||
hi def hlLevel6 ctermfg=yellow guifg=cyan1
|
||||
hi def hlLevel7 ctermfg=green guifg=slateblue1
|
||||
hi def hlLevel8 ctermfg=cyan guifg=magenta1
|
||||
hi def hlLevel9 ctermfg=magenta guifg=purple1
|
||||
else
|
||||
hi def hlLevel0 ctermfg=red guifg=red3
|
||||
hi def hlLevel1 ctermfg=darkyellow guifg=orangered3
|
||||
hi def hlLevel2 ctermfg=darkgreen guifg=orange2
|
||||
hi def hlLevel3 ctermfg=blue guifg=yellow3
|
||||
hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4
|
||||
hi def hlLevel5 ctermfg=red guifg=green4
|
||||
hi def hlLevel6 ctermfg=darkyellow guifg=paleturquoise3
|
||||
hi def hlLevel7 ctermfg=darkgreen guifg=deepskyblue4
|
||||
hi def hlLevel8 ctermfg=blue guifg=darkslateblue
|
||||
hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet
|
||||
endif
|
||||
endif
|
||||
|
||||
" Syntax Synchronizing
|
||||
syn sync minlines=10 maxlines=100
|
||||
|
||||
@@ -132,6 +174,7 @@ if !exists("did_falcon_syn_inits")
|
||||
HiLink falconComment Comment
|
||||
HiLink falconCommentL Comment
|
||||
HiLink falconConst Constant
|
||||
HiLink falconConstants Constant
|
||||
HiLink falconOperator Operator
|
||||
HiLink falconSymbol Normal
|
||||
HiLink falconSpaceError Error
|
||||
@@ -153,3 +196,4 @@ endif
|
||||
let b:current_syntax = "falcon"
|
||||
|
||||
" vim: set sw=4 sts=4 et tw=80 :
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2013 Apr 07
|
||||
" Last Change: 2013 Jun 02
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
|
||||
" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
|
||||
" Tom Payne <tom@tompayne.org>
|
||||
" Last Change: Sun Feb 20, 2011 12:06PM
|
||||
" Last Change: Sun May 19, 2013 05:59PM
|
||||
" Filenames: *.R *.r *.Rhistory *.Rt
|
||||
"
|
||||
" NOTE: The highlighting of R functions is defined in the
|
||||
@@ -30,7 +30,16 @@ endif
|
||||
syn case match
|
||||
|
||||
" Comment
|
||||
syn match rComment contains=@Spell "\#.*"
|
||||
syn match rComment contains=@Spell "#.*"
|
||||
|
||||
" Roxygen
|
||||
syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
|
||||
syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
|
||||
syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
|
||||
syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)"
|
||||
syn match rOKeyword contained "@\(method\|nord\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
|
||||
syn match rOComment contains=@Spell,rOKeyword "#'.*"
|
||||
|
||||
|
||||
if &filetype == "rhelp"
|
||||
" string enclosed in double quotes
|
||||
@@ -65,7 +74,7 @@ syn keyword rConditional if else
|
||||
syn keyword rRepeat for in repeat while
|
||||
|
||||
" Constant (not really)
|
||||
syn keyword rConstant T F LETTERS letters month.ab month.name pi
|
||||
syn keyword rConstant T F LETTERS letters month.abb month.name pi
|
||||
syn keyword rConstant R.version.string
|
||||
|
||||
syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
|
||||
@@ -105,8 +114,13 @@ syn match rOperator '-'
|
||||
syn match rOperator '\*'
|
||||
syn match rOperator '+'
|
||||
syn match rOperator '='
|
||||
syn match rOperator "[|!<>^~`/:@]"
|
||||
syn match rOperator "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%"
|
||||
if &filetype != "rmd" && &filetype != "rrst"
|
||||
syn match rOperator "[|!<>^~/:]"
|
||||
else
|
||||
syn match rOperator "[|!<>^~`/:]"
|
||||
endif
|
||||
syn match rOperator "%\{2}\|%\S*%"
|
||||
syn match rOpError '\*\{3}'
|
||||
syn match rOpError '//'
|
||||
syn match rOpError '&&&'
|
||||
syn match rOpError '|||'
|
||||
@@ -140,9 +154,11 @@ syn match rParenError "[\]}]" contained
|
||||
runtime r-plugin/functions.vim
|
||||
|
||||
syn match rDollar display contained "\$"
|
||||
syn match rDollar display contained "@"
|
||||
|
||||
" List elements will not be highlighted as functions:
|
||||
syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar
|
||||
syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar
|
||||
|
||||
" Functions that may add new objects
|
||||
syn keyword rPreProc library require attach detach source
|
||||
@@ -156,7 +172,9 @@ endif
|
||||
syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
|
||||
|
||||
" Name of object with spaces
|
||||
syn region rNameWSpace start="`" end="`"
|
||||
if &filetype != "rmd" && &filetype != "rrst"
|
||||
syn region rNameWSpace start="`" end="`"
|
||||
endif
|
||||
|
||||
if &filetype == "rhelp"
|
||||
syn match rhPreProc "^#ifdef.*"
|
||||
@@ -169,6 +187,7 @@ hi def link rArrow Statement
|
||||
hi def link rBoolean Boolean
|
||||
hi def link rBraceError Error
|
||||
hi def link rComment Comment
|
||||
hi def link rOComment Comment
|
||||
hi def link rComplex Number
|
||||
hi def link rConditional Conditional
|
||||
hi def link rConstant Constant
|
||||
@@ -195,6 +214,7 @@ hi def link rStatement Statement
|
||||
hi def link rString String
|
||||
hi def link rStrError Error
|
||||
hi def link rType Type
|
||||
hi def link rOKeyword Title
|
||||
|
||||
let b:current_syntax="r"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: reStructuredText documentation format
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2012-11-01
|
||||
" Latest Revision: 2013-06-03
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -135,10 +135,6 @@ execute 'syn match rstHyperlinkReference' .
|
||||
syn match rstStandaloneHyperlink contains=@NoSpell
|
||||
\ "\<\%(\%(\%(https\=\|file\|ftp\|gopher\)://\|\%(mailto\|news\):\)[^[:space:]'\"<>]\+\|www[[:alnum:]_-]*\.[[:alnum:]_-]\+\.[^[:space:]'\"<>]\+\)[[:alnum:]/]"
|
||||
|
||||
" TODO: Use better syncing. I don’t know the specifics of syncing well enough,
|
||||
" though.
|
||||
syn sync minlines=50 linebreaks=1
|
||||
|
||||
syn region rstCodeBlock contained matchgroup=rstDirective
|
||||
\ start=+\%(sourcecode\|code\%(-block\)\=\)::\s+
|
||||
\ skip=+^$+
|
||||
@@ -160,6 +156,9 @@ for code in g:rst_syntax_code_list
|
||||
exe 'syn cluster rstDirectives add=rstDirective'.code
|
||||
endfor
|
||||
|
||||
" TODO: Use better syncing.
|
||||
syn sync minlines=50 linebreaks=2
|
||||
|
||||
hi def link rstTodo Todo
|
||||
hi def link rstComment Comment
|
||||
hi def link rstSections Title
|
||||
|
||||
Reference in New Issue
Block a user