Changeset 26505


Ignore:
Timestamp:
10/27/21 07:39:19 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added julia files

Location:
issm/trunk-jpl/externalpackages/vim/addons
Files:
20 added
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/externalpackages/vim/addons/vim/syntax/julia.vim

    r26356 r26505  
    99  finish
    1010endif
     11
     12let s:cpo_save = &cpo
     13set cpo&vim
    1114
    1215if version < 704
     
    3740" because those may or may not be valid in the lookbehind on a case-by-case
    3841" basis.
    39 let s:nonid_chars = '\U00-\U08' . '\U0A-\U1F' .
    40       \             '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B-\U5E' . '\U60' . '\U7B\U7C' .
    41       \             '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
     42let s:nonid_chars = '\U00-\U08' . '\U0A-\U1F'
     43      \           . '\U21-\U28' . '\U2A-\U2F' . '\U3A-\U40' . '\U5B-\U5E' . '\U60' . '\U7B\U7C'
     44      \           . '\U7E-\UA1' . '\UA7\UA8' . '\UAB-\UAD' . '\UAF\UB1\UB4' . '\UB6-\UB8' . '\UBB\UBF' . '\UD7\UF7'
    4245
    4346" The complete list
     
    5760
    5861" Full operators regex
    59 let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?=' .
    60       \           '\|'  . '[:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?' .
    61       \           '\|'  . '\.\?[!' . s:op_chars . s:op_chars_wc . ']' .
    62       \           '\)'
     62let s:operators = '\%(' . '\.\%([-+*/^÷%|&⊻]\|//\|\\\|>>\|>>>\?\)\?='
     63      \         . '\|'  . '[:<>]=\|||\|&&\||>\|<|\|[<>:]:\|<<\|>>>\?\|//\|[-=]>\|\.\.\.\?'
     64      \         . '\|'  . '\.\?[!' . s:op_chars . s:op_chars_wc . ']'
     65      \         . '\)'
    6366
    6467
     
    244247let s:oct_regex = '0o\o\%(_\?\o\)*\%(\>\|im\>\|\ze\O\)'
    245248
    246 let s:int_regex = '\%(' . s:hex_regex .
    247       \           '\|'  . s:bin_regex .
    248       \           '\|'  . s:oct_regex .
    249       \           '\|'  . s:dec_regex .
    250       \           '\)'
     249let s:int_regex = '\%(' . s:hex_regex
     250      \         . '\|'  . s:bin_regex
     251      \         . '\|'  . s:oct_regex
     252      \         . '\|'  . s:dec_regex
     253      \         . '\)'
    251254
    252255"floating point regexes
     
    264267let s:hexfloat_regex2 = '0x\x\%(_\?\x\)*\%\(\.\%\(\x\%(_\?\x\)*\)\?\)\?[pP][-+]\?\d\+\%(\>\|im\>\|\ze\X\)'
    265268
    266 let s:float_regex = '\%(' . s:float_regex3 .
    267       \             '\|'  . s:float_regex2 .
    268       \             '\|'  . s:float_regex1 .
    269       \             '\|'  . s:hexfloat_regex2 .
    270       \             '\|'  . s:hexfloat_regex1 .
    271       \             '\)'
     269let s:float_regex = '\%(' . s:float_regex3
     270      \           . '\|'  . s:float_regex2
     271      \           . '\|'  . s:float_regex1
     272      \           . '\|'  . s:hexfloat_regex2
     273      \           . '\|'  . s:hexfloat_regex1
     274      \           . '\)'
    272275
    273276exec 'syntax match   juliaNumber        contained "' . s:int_regex . '" contains=juliaComplexUnit'
     
    379382syntax region  juliaCommentM            matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
    380383syntax keyword juliaTodo                contained TODO FIXME XXX
     384
     385"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
     386"ISSM special syntax                                                                                             "
     387let enumfile=$ISSM_DIR."/src/c/shared/Enum/Enumjl.vim"
     388if filereadable(enumfile)
     389   exec 'source ' . enumfile
     390endif
     391"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    381392
    382393" detect an end-of-line with only whitespace or comments before it
     
    542553
    543554let b:current_syntax = "julia"
     555
     556let &cpo = s:cpo_save
     557unlet s:cpo_save
  • issm/trunk-jpl/externalpackages/vim/addons/vim/syntax/juliadoc.vim

    r26356 r26505  
    55  finish
    66endif
     7
     8let s:cpo_save = &cpo
     9set cpo&vim
    710
    811syntax sync fromstart
     
    6467
    6568let b:current_syntax = "juliadoc"
     69
     70let &cpo = s:cpo_save
     71unlet s:cpo_save
  • issm/trunk-jpl/externalpackages/vim/addons/vimrc

    r24217 r26505  
    214214au BufRead,BufNewFile *.py     iabbr <silent> ER  raise NameError('')<Left><Left><C-R>=Eatchar('\s')<CR>
    215215au BufRead,BufNewFile *.m      iabbr <silent> ER  error('');<Left><Left><Left><C-R>=Eatchar('\s')<CR>
     216au BufRead,BufNewFile *.jl     iabbr <silent> ER  error("")<Left><Left><C-R>=Eatchar('\s')<CR>
    216217au BufRead,BufNewFile *.c*     ab VV VecView(ug,PETSC_VIEWER_STDOUT_WORLD);
    217218au BufRead,BufNewFile *.c*,*.h ab AS _assert_();<Left><Left><C-R>=Eatchar('\s')<CR>
Note: See TracChangeset for help on using the changeset viewer.