Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add R and matlab highlighting: partially working #132

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion syntax/julia.vim
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ let s:operators = '\%(' . '\.\%([-+*/^÷%|&!]\|//\|\\\|<<\|>>>\?\)\?=' .

syn case match

syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juliaKeywordItems,@juliaBlocksItems,@juliaTypesItems,@juliaConstItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaNumberItems,@juliaCommentItems,@juliaErrorItems
syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juliaKeywordItems,@juliaBlocksItems,@juliaTypesItems,@juliaConstItems,@juliaMacroItems,@juliaSymbolItems,@juliaOperatorItems,@juliaNumberItems,@juliaCommentItems,@juliaErrorItems,@juliaCodeItems
syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems

syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
Expand Down Expand Up @@ -126,6 +126,7 @@ endif
syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
syntax cluster juliaNumberItems contains=juliaNumbers
syntax cluster juliaCodeItems contains=juliaRCode,juliaMatlabCode
syntax cluster juliaStringItems contains=juliaChar,juliaString,juliabString,juliasString,juliavString,juliaipString,juliabigString,juliaMIMEString,juliaShellString,juliaDocString,juliaRegEx
syntax cluster juliaPrintfItems contains=juliaPrintfParBlock,juliaPrintfString
syntax cluster juliaOperatorItems contains=juliaOperator,juliaRangeOperator,juliaCTransOperator,juliaTernaryRegion,juliaColon,juliaSemicolon,juliaComma
Expand Down Expand Up @@ -327,6 +328,11 @@ syntax region juliaipString matchgroup=juliaStringDelim start=+\<ip\z("\(""\)\
syntax region juliabigString matchgroup=juliaStringDelim start=+\<big\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+
syntax region juliaMIMEString matchgroup=juliaStringDelim start=+\<MIME\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars

syntax include @juliaRSyntax syntax/r.vim
syntax region juliaRCode matchgroup=juliaR start=+R"""+ end=+"""+ contains=@juliaRSyntax
syntax include @juliaMatlabSyntax syntax/matlab.vim
syntax region juliaMatlabCode matchgroup=juliaMatlab start=+mat"""+ end=+"""+ contains=@juliaMatlabSyntax

syntax region juliaDocString matchgroup=juliaStringDelim start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings

exec 'syntax region juliaPrintfMacro contained transparent start="@s\?printf(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaPrintfParBlock'
Expand Down Expand Up @@ -486,6 +492,8 @@ hi def link juliaComplexUnit Constant

hi def link juliaChar Character

hi def link juliaR String
hi def link juliaMatlab String
hi def link juliaString String
hi def link juliabString String
hi def link juliasString String
Expand Down