diff -Nru vim-julia-0.0~git20190903.995eae2/autoload/julia_latex_symbols.vim vim-julia-0.0~git20200213.8c0b9e8/autoload/julia_latex_symbols.vim --- vim-julia-0.0~git20190903.995eae2/autoload/julia_latex_symbols.vim 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/autoload/julia_latex_symbols.vim 2020-02-13 14:32:28.000000000 +0000 @@ -1,5 +1,5 @@ " This file is autogenerated from the script 'generate_latex_symbols_table.jl' -" The symbols are based on Julia version 1.3.0-DEV.263 +" The symbols are based on Julia version 1.5.0-DEV.67 scriptencoding utf-8 @@ -656,7 +656,9 @@ \ '\nequiv': '≢', \ '\Equiv': '≣', \ '\le': '≤', + \ '\leq': '≤', \ '\ge': '≥', + \ '\geq': '≥', \ '\leqq': '≦', \ '\geqq': '≧', \ '\lneqq': '≨', diff -Nru vim-julia-0.0~git20190903.995eae2/autoload/julia.vim vim-julia-0.0~git20200213.8c0b9e8/autoload/julia.vim --- vim-julia-0.0~git20190903.995eae2/autoload/julia.vim 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/autoload/julia.vim 2020-02-13 14:32:28.000000000 +0000 @@ -1,28 +1,9 @@ function! julia#set_syntax_version(jvers) - if &filetype != "julia" - echo "Not a Julia file" - return - endif - syntax clear - let b:julia_syntax_version = a:jvers - set filetype=julia + echo "The julia#set_syntax_version function is deprecated" endfunction function! julia#toggle_deprecated_syntax() - if &filetype != "julia" - echo "Not a Julia file" - return - endif - syntax clear - let hd = get(b:, "julia_syntax_highlight_deprecated", - \ get(g:, "julia_syntax_highlight_deprecated", 0)) - let b:julia_syntax_highlight_deprecated = hd ? 0 : 1 - set filetype=julia - if b:julia_syntax_highlight_deprecated - echo "Highlighting of deprecated syntax enabled" - else - echo "Highlighting of deprecated syntax disabled" - endif + echo "The julia#toggle_deprecated_syntax function is deprecated" endfunction if exists("loaded_matchit") diff -Nru vim-julia-0.0~git20190903.995eae2/autoload/LaTeXtoUnicode.vim vim-julia-0.0~git20200213.8c0b9e8/autoload/LaTeXtoUnicode.vim --- vim-julia-0.0~git20190903.995eae2/autoload/LaTeXtoUnicode.vim 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/autoload/LaTeXtoUnicode.vim 2020-02-13 14:32:28.000000000 +0000 @@ -11,6 +11,9 @@ if !has_key(b:, "l2u_enabled") let b:l2u_enabled = 0 endif + if !has_key(b:, "l2u_autodetect_enable") + let b:l2u_autodetect_enable = 1 + endif " Did we install the L2U tab mappings? if !has_key(b:, "l2u_tab_set") @@ -90,34 +93,39 @@ " Each time the filetype changes, we may need to enable or " disable the LaTeX-to-Unicode functionality function! LaTeXtoUnicode#Refresh() - call s:L2U_Setup() + " skip if manually overridden + if !b:l2u_autodetect_enable + return '' + endif + " by default, LaTeX-to-Unicode is only active on julia files let file_types = s:L2U_file_type_regex(get(g:, "latex_to_unicode_file_types", "julia")) let file_types_blacklist = s:L2U_file_type_regex(get(g:, "latex_to_unicode_file_types_blacklist", "$^")) if match(&filetype, file_types) < 0 || match(&filetype, file_types_blacklist) >= 0 if b:l2u_enabled - call LaTeXtoUnicode#Disable() + call LaTeXtoUnicode#Disable(1) else - return + return '' endif elseif !b:l2u_enabled - call LaTeXtoUnicode#Enable() + call LaTeXtoUnicode#Enable(1) endif - endfunction -function! LaTeXtoUnicode#Enable() +function! LaTeXtoUnicode#Enable(...) + let auto_set = a:0 > 0 ? a:1 : 0 if b:l2u_enabled - return + return '' end call s:L2U_ResetLastCompletionInfo() let b:l2u_enabled = 1 + let b:l2u_autodetect_enable = auto_set " If we're editing the first file upon opening vim, this will only init the " command line mode mapping, and the full initialization will be performed by @@ -125,18 +133,18 @@ " Otherwise, if we're opening a file from within a running vim session, this " will actually initialize all the LaTeX-to-Unicode substitutions. call LaTeXtoUnicode#Init() - - return - + return '' endfunction -function! LaTeXtoUnicode#Disable() +function! LaTeXtoUnicode#Disable(...) + let auto_set = a:0 > 0 ? a:1 : 0 if !b:l2u_enabled - return + return '' endif let b:l2u_enabled = 0 + let b:l2u_autodetect_enable = auto_set call LaTeXtoUnicode#Init() - return + return '' endfunction " Translate old options to their new equivalents @@ -244,7 +252,6 @@ endif let b:l2u_in_fallback = 0 " set info for the callback - let b:l2u_tab_completing = 1 let b:l2u_found_completion = 1 " analyse current line let col1 = col('.') @@ -373,6 +380,7 @@ endif " reset the in_fallback info let b:l2u_in_fallback = 0 + let b:l2u_tab_completing = 1 " temporary change to completeopt to use the `longest` setting, which is " probably the only one which makes sense given that the goal of the " completion is to substitute the final string @@ -381,7 +389,8 @@ set completeopt-=noinsert " invoke omnicompletion; failure to perform LaTeX-to-Unicode completion is " handled by the CompleteDone autocommand. - return "\\" + call feedkeys("\\", 'n') + return "" endfunction " This function is called at every CompleteDone event, and is meant to handle @@ -407,7 +416,7 @@ endfunction " This is the function that performs the substitution in command-line mode -function! LaTeXtoUnicode#CmdTab(triggeredbytab) +function! LaTeXtoUnicode#CmdTab(trigger) " first stage " analyse command line let col1 = getcmdpos() - 1 @@ -416,10 +425,12 @@ let b:l2u_singlebslash = (match(l[0:col1-1], '\\$') >= 0) " completion not found if col0 == -1 - if a:triggeredbytab - call feedkeys("\", 'nt') " fall-back to the default + if a:trigger == &wildchar + call feedkeys(nr2char(a:trigger), 'nt') " fall-back to the default wildchar + elseif a:trigger == char2nr("\") + call feedkeys("\", 'nt') " fall-back to the default endif - return l + return '' endif let base = l[col0 : col1-1] " search for matches @@ -428,39 +439,28 @@ for k in keys(g:l2u_symbols_dict) if k ==# base let exact_match = 1 - endif - if len(k) >= len(base) && k[0 : len(base)-1] ==# base + break + elseif len(k) >= len(base) && k[0 : len(base)-1] ==# base call add(partmatches, k) endif endfor - if len(partmatches) == 0 - if a:triggeredbytab - call feedkeys("\", 'nt') " fall-back to the default + if !exact_match && len(partmatches) == 0 + " no matches, call fallbacks + if a:trigger == &wildchar + call feedkeys(nr2char(a:trigger), 'nt') " fall-back to the default wildchar + elseif a:trigger == char2nr("\") + call feedkeys("\", 'nt') " fall-back to the default endif - return l - endif - " exact matches are replaced with Unicode - if exact_match + elseif exact_match + " exact matches are replaced with Unicode let unicode = g:l2u_symbols_dict[base] - if col0 > 0 - let pre = l[0 : col0 - 1] - else - let pre = '' - endif - let posdiff = col1-col0 - len(unicode) - call setcmdpos(col1 - posdiff + 1) - return pre . unicode . l[col1 : -1] - endif - " no exact match: complete with the longest common prefix - let common = s:L2U_longest_common_prefix(partmatches) - if col0 > 0 - let pre = l[0 : col0 - 1] + call feedkeys(repeat("\b", len(base)) . unicode, 'nt') else - let pre = '' + " no exact match: complete with the longest common prefix + let common = s:L2U_longest_common_prefix(partmatches) + call feedkeys(common[len(base):], 'nt') endif - let posdiff = col1-col0 - len(common) - call setcmdpos(col1 - posdiff + 1) - return pre . common . l[col1 : -1] + return '' endfunction " Setup the L2U tab mapping @@ -471,7 +471,8 @@ let b:l2u_cmdtab_keys = [b:l2u_cmdtab_keys] endif for k in b:l2u_cmdtab_keys - exec 'cnoremap '.k.' eLaTeXtoUnicode#CmdTab('.(k ==? '').')' + exec 'let trigger = char2nr("'.(k[0] == '<' ? '\' : '').k.'")' + exec 'cnoremap '.k.' LaTeXtoUnicode#CmdTab('.trigger.')' endfor let b:l2u_cmdtab_set = 1 endif @@ -635,6 +636,7 @@ call s:L2U_SetTab(wait_insert_enter) call s:L2U_SetAutoSub(wait_insert_enter) call s:L2U_SetKeymap() + return '' endfunction function! LaTeXtoUnicode#Toggle() @@ -646,5 +648,5 @@ call LaTeXtoUnicode#Enable() echo "LaTeX-to-Unicode enabled" endif - return + return '' endfunction diff -Nru vim-julia-0.0~git20190903.995eae2/debian/changelog vim-julia-0.0~git20200213.8c0b9e8/debian/changelog --- vim-julia-0.0~git20190903.995eae2/debian/changelog 2020-01-08 00:50:11.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/debian/changelog 2020-02-17 02:45:15.000000000 +0000 @@ -1,3 +1,10 @@ +vim-julia (0.0~git20200213.8c0b9e8-1) unstable; urgency=medium + + * New upstream version 0.0~git20200213.8c0b9e8 + * Sort content in vim-julia.yaml + + -- Mo Zhou Mon, 17 Feb 2020 10:45:15 +0800 + vim-julia (0.0~git20190903.995eae2-1) unstable; urgency=medium * New upstream version 0.0~git20190903.995eae2 diff -Nru vim-julia-0.0~git20190903.995eae2/debian/vim-julia.yaml vim-julia-0.0~git20200213.8c0b9e8/debian/vim-julia.yaml --- vim-julia-0.0~git20190903.995eae2/debian/vim-julia.yaml 2019-12-26 06:41:03.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/debian/vim-julia.yaml 2020-02-17 02:32:06.000000000 +0000 @@ -1,19 +1,19 @@ addon: julia description: "Julia language support" files: - - ftdetect/julia.vim + - autoload/LaTeXtoUnicode.vim + - autoload/generate_latex_symbols_table.jl + - autoload/julia/doc.vim + - autoload/julia.vim + - autoload/julia_blocks.vim + - autoload/julia_latex_symbols.vim - doc/generate_latex_symbols_table.jl - - doc/julia-vim-L2U.txt - doc/julia-vim-L2U-table.txt + - doc/julia-vim-L2U.txt - doc/julia-vim.txt + - ftdetect/julia.vim - ftplugin/julia.vim - ftplugin/juliadoc.vim - indent/julia.vim - - autoload/julia/doc.vim - - autoload/LaTeXtoUnicode.vim - - autoload/generate_latex_symbols_table.jl - - autoload/julia.vim - - autoload/julia_latex_symbols.vim - - autoload/julia_blocks.vim - syntax/julia.vim - syntax/juliadoc.vim diff -Nru vim-julia-0.0~git20190903.995eae2/doc/julia-vim-L2U-table.txt vim-julia-0.0~git20200213.8c0b9e8/doc/julia-vim-L2U-table.txt --- vim-julia-0.0~git20190903.995eae2/doc/julia-vim-L2U-table.txt 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/doc/julia-vim-L2U-table.txt 2020-02-13 14:32:28.000000000 +0000 @@ -4,7 +4,7 @@ LATEX-TO-UNICODE REFERENCE TABLE *L2U-ref* *julia-vim-L2U-reference* Note: This file is autogenerated from the script 'generate_latex_symbols_table.jl' - The symbols are based on the documentation of Julia version 1.3.0-DEV.263 + The symbols are based on the documentation of Julia version 1.5.0-DEV.67 See |julia-vim| for the LaTeX-to-Unicode manual. Code point(s) Character(s) Tab completion sequence(s) Unicode name(s)~ @@ -639,8 +639,8 @@ U+02261 ≡ \equiv IDENTICAL TO U+02262 ≢ \nequiv NOT IDENTICAL TO U+02263 ≣ \Equiv STRICTLY EQUIVALENT TO -U+02264 ≤ \le LESS-THAN OR EQUAL TO / LESS THAN OR EQUAL TO -U+02265 ≥ \ge GREATER-THAN OR EQUAL TO / GREATER THAN OR EQUAL TO +U+02264 ≤ \le, \leq LESS-THAN OR EQUAL TO / LESS THAN OR EQUAL TO +U+02265 ≥ \ge, \geq GREATER-THAN OR EQUAL TO / GREATER THAN OR EQUAL TO U+02266 ≦ \leqq LESS-THAN OVER EQUAL TO / LESS THAN OVER EQUAL TO U+02267 ≧ \geqq GREATER-THAN OVER EQUAL TO / GREATER THAN OVER EQUAL TO U+02268 ≨ \lneqq LESS-THAN BUT NOT EQUAL TO / LESS THAN BUT NOT EQUAL TO diff -Nru vim-julia-0.0~git20190903.995eae2/doc/julia-vim-L2U.txt vim-julia-0.0~git20200213.8c0b9e8/doc/julia-vim-L2U.txt --- vim-julia-0.0~git20190903.995eae2/doc/julia-vim-L2U.txt 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/doc/julia-vim-L2U.txt 2020-02-13 14:32:28.000000000 +0000 @@ -249,15 +249,15 @@ For example, you could use a mapping like: > noremap LaTeXtoUnicode#Toggle() - inoremap LaTeXtoUnicode#Toggle() + noremap! LaTeXtoUnicode#Toggle() < and then use the key to quickly switch the functionality on and off as -needed (the first mapping is for |Normal| mode, the second for |Insert| mode). +needed (see |noremap| and |noremap!|). -NOTE: these functions are different from the variables |g:latex_to_unicode_tab| -and |g:latex_to_unicode_auto|: the functions enable/disable the functionality -as a whole, while the variables control individual features (tab substitution -and auto substitution). +NOTE: these functions are different from the variables |g:latex_to_unicode_tab|, +|g:latex_to_unicode_auto| and |g:latex_to_unicode_keymap|: the functions +enable/disable the functionality as a whole, while the variables control +individual features (tab, auto and keymap substitution). ============================================================================== VARIABLES *julia-vim-L2U-variables* diff -Nru vim-julia-0.0~git20190903.995eae2/doc/julia-vim.txt vim-julia-0.0~git20200213.8c0b9e8/doc/julia-vim.txt --- vim-julia-0.0~git20190903.995eae2/doc/julia-vim.txt 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/doc/julia-vim.txt 2020-02-13 14:32:28.000000000 +0000 @@ -24,7 +24,6 @@ CONTENTS *julia-vim* Introduction |julia-vim-introduction| -Chosing Julia version |julia-vim-version| Block-wise movements/objects |julia-vim-blocks| Keyword-oriented movements |julia-vim-blocks-move| Block-oriented movements |julia-vim-blocks-moveblock| @@ -50,61 +49,13 @@ just Julia files. See |julia-vim-L2U|. - a keymapping |K| to refer julia documents. -This help file documents: 1) how to choose the Julia version for syntax -highlighting, and 2) the block-wise movements and objects, how they work and -what variables can be used to enable/disable/tweak them. +This help file documents: 1) the block-wise movements and objects, how they +work and what variables can be used to enable/disable/tweak them; 2) The +documentation lookup facility; 3) Some extra functions and customization +options. The LaTeX-to-Unicode facilities are documented in |julia-vim-L2U|. ============================================================================== -CHOOSING JULIA VERSION *julia-vim-version* - -By default, the syntax highlighting is based on the current Julia release -(version 1.0 at the time of writing). The plugin supports the previous stable -version and the development version as well, and allows to switch between -them. (Note that the plugin does not differentiate between 0.7 and 1.0.) - - *g:default_julia_version* -g:default_julia_version - - Determines the default Julia version to use when opening a - Julia file. The default is `"current"`, meaning the latest - stable release. Allowed values are: `"current"` (or - `"release"`), `"previous"` (or `"legacy"`), `"next"` (or - `"devel"`), or numeric values (`"0.6"`, `"1.0"`, `"1.1"`). You - would normally set this variable in your |.vimrc| file, e.g.: -> - let g:default_julia_version = "devel" -< - - *julia#set_syntax_version()* -julia#set_syntax_version(`julia_version`) - - This function allows to change the syntax highlighting for the - current buffer. The argument is the same as for - |g:default_julia_version|. If you switch often between projects - developed using different versions of Julia, you may want to - create a mapping to switch rapidly between them (you can read - out the currently used version from the variable - `b:julia_syntax_version`, which uses a numeric scheme, i.e. - `6` for version `0.6`, `10` for `1.0` etc). - - *g:julia_syntax_highlight_deprecated* -g:julia_syntax_highlight_deprecated - - Determines whether to highlight deprecated syntax, according - to the Julia version in use (see |g:default_julia_verison|). - Default: off (set to `0`). - - *julia#toggle_deprecated_syntax()* -julia#toggle_deprecated_syntax() - - This function allows to switch on or off the highlighting of - deprecaed syntax (see |g:julia_syntax_highlight_deprecated|). - The current status is stored in the variable - `b:julia_syntax_highlight_deprecated`. - - -============================================================================== BLOCK-WISE MOVEMENTS AND BLOCK TEXT OBJECTS *julia-vim-blocks* In Julia, all blocks start with a keyword (`module`, `function`, `if`, `for`, diff -Nru vim-julia-0.0~git20190903.995eae2/indent/julia.vim vim-julia-0.0~git20200213.8c0b9e8/indent/julia.vim --- vim-julia-0.0~git20190903.995eae2/indent/julia.vim 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/indent/julia.vim 2020-02-13 14:32:28.000000000 +0000 @@ -48,9 +48,8 @@ let e = a:0 > 1 ? a:2 : -1 let blocks_stack = [] let num_closed_blocks = 0 - let tt = get(b:, 'julia_syntax_version', 10) == 6 ? '\|\%(\%(abstract\|primitive\)\s\+\)\@', s, e) + let fb = JuliaMatch(a:lnum, line, '@\@', s, e) let fe = JuliaMatch(a:lnum, line, '@\@', s, e) if fb < 0 && fe < 0 @@ -132,7 +131,7 @@ continue endif - let i = JuliaMatch(a:lnum, line, '@\@', s) + let i = JuliaMatch(a:lnum, line, '@\@', s) if i >= 0 && i == fb if match(line, '\C\<\%(mutable\|abstract\|primitive\)', i) != -1 let s = i+11 diff -Nru vim-julia-0.0~git20190903.995eae2/keymap/latex2unicode_utf-8.vim vim-julia-0.0~git20200213.8c0b9e8/keymap/latex2unicode_utf-8.vim --- vim-julia-0.0~git20190903.995eae2/keymap/latex2unicode_utf-8.vim 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/keymap/latex2unicode_utf-8.vim 2020-02-13 14:32:28.000000000 +0000 @@ -1,5 +1,5 @@ " This file is autogenerated from the script 'generate_L2U_keymap.jl' -" The symbols are based on Julia version 1.3.0-DEV.263 +" The symbols are based on Julia version 1.5.0-DEV.67 " The full generating script can be found in the comments at the bottom of this file, " and it can be extracted with: " @@ -1850,11 +1850,13 @@ \\ge " ≥ : GREATER-THAN OR EQUAL TO / GREATER THAN OR EQUAL TO \\gem \\gem " : (Incomplete sequence) \\gemini " ♊ : GEMINI -\\geq \\geq " : (Incomplete sequence) +\\geq " ≥ : GREATER-THAN OR EQUAL TO / GREATER THAN OR EQUAL TO +\\geq " ≥ : GREATER-THAN OR EQUAL TO / GREATER THAN OR EQUAL TO \\geqq " ≧ : GREATER-THAN OVER EQUAL TO / GREATER THAN OVER EQUAL TO \\geqq " ≧ : GREATER-THAN OVER EQUAL TO / GREATER THAN OVER EQUAL TO \\geqqs \\geqqs " : (Incomplete sequence) \\geqqslant " ⫺ : DOUBLE-LINE SLANTED GREATER-THAN OR EQUAL TO +\\geqs \\geqs " : (Incomplete sequence) \\geqslant " ⩾ : GREATER-THAN OR SLANTED EQUAL TO \\ges \\ges " : (Incomplete sequence) \\gescc " ⪩ : GREATER-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL @@ -2292,11 +2294,13 @@ \\leftwavearrow " ↜ : LEFTWARDS WAVE ARROW / LEFT WAVE ARROW \\leftwhitearrow " ⇦ : LEFTWARDS WHITE ARROW / WHITE LEFT ARROW \\leo " ♌ : LEO -\\leq \\leq " : (Incomplete sequence) +\\leq " ≤ : LESS-THAN OR EQUAL TO / LESS THAN OR EQUAL TO +\\leq " ≤ : LESS-THAN OR EQUAL TO / LESS THAN OR EQUAL TO \\leqq " ≦ : LESS-THAN OVER EQUAL TO / LESS THAN OVER EQUAL TO \\leqq " ≦ : LESS-THAN OVER EQUAL TO / LESS THAN OVER EQUAL TO \\leqqs \\leqqs " : (Incomplete sequence) \\leqqslant " ⫹ : DOUBLE-LINE SLANTED LESS-THAN OR EQUAL TO +\\leqs \\leqs " : (Incomplete sequence) \\leqslant " ⩽ : LESS-THAN OR SLANTED EQUAL TO \\les \\les " : (Incomplete sequence) \\lescc " ⪨ : LESS-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL diff -Nru vim-julia-0.0~git20190903.995eae2/README.md vim-julia-0.0~git20200213.8c0b9e8/README.md --- vim-julia-0.0~git20190903.995eae2/README.md 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/README.md 2020-02-13 14:32:28.000000000 +0000 @@ -173,27 +173,3 @@ See the documentation for details. Note that this feature requires Vim version 7.4 or higher. - -## Changing syntax highlighting depending on the Julia version - -The plugin supports syntax highlighting different versions of Julia. By default, the highlighting scheme assumes -the latest stable release of Julia (currently, version 1.0; the plugin does not differentiate between 0.7 and 1.0), -but the previous one and the latest version under development are also supported. You can set a global default in -your `.vimrc`, e.g. if you follow Julia's master you can use: - -``` -let g:default_julia_version = "devel" -``` - -or if you are still using Julia 0.6 you can use: - -``` -let g:default_julia_version = "0.6" -``` - -You can also switch version for a particular buffer, by using the `julia#set_syntax_version()` function, e.g. -by typing in Vim: - -``` -:call julia#set_syntax_version("0.6") -``` diff -Nru vim-julia-0.0~git20190903.995eae2/syntax/julia.vim vim-julia-0.0~git20200213.8c0b9e8/syntax/julia.vim --- vim-julia-0.0~git20190903.995eae2/syntax/julia.vim 2019-09-03 12:25:48.000000000 +0000 +++ vim-julia-0.0~git20200213.8c0b9e8/syntax/julia.vim 2020-02-13 14:32:28.000000000 +0000 @@ -23,24 +23,6 @@ scriptencoding utf-8 -if !exists("b:julia_syntax_version") - let b:julia_syntax_version = get(g:, "default_julia_version", "current") -endif -if !exists("b:julia_syntax_highlight_deprecated") - let b:julia_syntax_highlight_deprecated = get(g:, "julia_syntax_highlight_deprecated", 0) -endif - -if b:julia_syntax_version =~? '\<\%(curr\%(ent\)\?\|release\|7\|0\.7\|10\|1.0\)\>' - let b:julia_syntax_version = 10 -elseif b:julia_syntax_version =~? '\<\%(next\|devel\|11\|1\.1\)\>' - let b:julia_syntax_version = 11 -elseif b:julia_syntax_version =~? '\<\%(prev\%(ious\)\?\|legacy\|6\|0\.6\)\>' - let b:julia_syntax_version = 6 -else - echohl WarningMsg | echomsg "Unrecognized or unsupported julia syntax version: " . b:julia_syntax_version | echohl None - let b:julia_syntax_version = 10 -endif - let s:julia_spellcheck_strings = get(g:, "julia_spellcheck_strings", 0) let s:julia_spellcheck_docstrings = get(g:, "julia_spellcheck_docstrings", 1) let s:julia_spellcheck_comments = get(g:, "julia_spellcheck_comments", 1) @@ -94,24 +76,10 @@ syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar syntax cluster juliaKeywordItems contains=juliaKeyword,juliaInfixKeyword,juliaRepKeyword,juliaTypedef -syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock -if b:julia_syntax_version == 6 - syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems06 -else - syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems06,@juliaTypesItems1011 -endif -syntax cluster juliaTypesItemsAll contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther -syntax cluster juliaTypesItems06 contains=juliaBaseTypeNum06,juliaBaseTypeRange06,juliaBaseTypeDict06,juliaBaseTypeSet06 -syntax cluster juliaTypesItems1011 contains=juliaBaseTypeBasic1011,juliaBaseTypeNum1011,juliaBaseTypeError1011,juliaBaseTypeIter1011,juliaBaseTypeRange1011,juliaBaseTypeArray1011,juliaBaseTypeDict1011,juliaBaseTypeSet1011,juliaBaseTypeC1011,juliaBaseTypeDisplay1011,juliaBaseTypeIO1011,juliaBaseTypeString1011 - -syntax cluster juliaConstItemsAll contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric -syntax cluster juliaConstItems06 contains=juliaConstNum06,juliaConstIO06 -syntax cluster juliaConstItems1011 contains=juliaConstGeneric1011,juliaPossibleEuler,juliaConstEnv1011,juliaConstIO1011 -if b:julia_syntax_version == 6 - syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems06 -else - syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems06,@juliaConstItems1011 -endif +syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock +syntax cluster juliaTypesItems contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther + +syntax cluster juliaConstItems contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric,juliaConstIO,juliaPossibleEuler syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra syntax cluster juliaSymbolItems contains=juliaPossibleSymbol @@ -122,18 +90,18 @@ syntax cluster juliaCommentItems contains=juliaCommentL,juliaCommentM syntax cluster juliaErrorItems contains=juliaErrorPar,juliaErrorEnd,juliaErrorElse,juliaErrorCatch,juliaErrorFinally -syntax cluster juliaSpellcheckStrings contains=@spell +syntax cluster juliaSpellcheckStrings contains=@spell syntax cluster juliaSpellcheckDocStrings contains=@spell -syntax cluster juliaSpellcheckComments contains=@spell +syntax cluster juliaSpellcheckComments contains=@spell if !s:julia_spellcheck_docstrings - syntax cluster juliaSpellcheckDocStrings remove=@spell + syntax cluster juliaSpellcheckDocStrings remove=@spell endif if !s:julia_spellcheck_strings - syntax cluster juliaSpellcheckStrings remove=@spell + syntax cluster juliaSpellcheckStrings remove=@spell endif if !s:julia_spellcheck_comments - syntax cluster juliaSpellcheckComments remove=@spell + syntax cluster juliaSpellcheckComments remove=@spell endif syntax match juliaSemicolon display ";" @@ -170,10 +138,6 @@ exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' exec 'syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' -if b:julia_syntax_version <= 10 - exec 'syntax region juliaTypeBlock matchgroup=juliaBlKeyword06 start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' - exec 'syntax region juliaImmutableBlock matchgroup=juliaBlKeyword06 start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' -endif exec 'syntax region juliaStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' exec 'syntax region juliaLetBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\" end="'.s:nodot.'\" contains=@juliaExpressions fold' @@ -190,64 +154,43 @@ exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor' exec 'syntax match juliaComprehensionIf contained "'.s:nodot.'\"' -exec 'syntax match juliaOuter contained "\"' +exec 'syntax match juliaOuter contained "\"' -syntax match juliaBaseTypeBasic display "\<\%(Tuple\|NTuple\|Symbol\|Function\|Union\%(All\)\?\|Type\%(Name\|Var\)\?\|Any\|ANY\|Vararg\|Ptr\|Exception\|Module\|Expr\|DataType\|\%(LineNumber\|Quote\)Node\|\%(Weak\|Global\)\?Ref\|Method\|Pair\|Val\)\>" -syntax match juliaBaseTypeBasic06 display "\<\%(Void\|\%(Label\|Goto\)Node\|Associative\|MethodTable\|Nullable\|TypeMap\%(Level\|Entry\)\|CodeInfo\)\>" -syntax match juliaBaseTypeBasic1011 display "\<\%(Nothing\|Some\|Missing\|NamedTuple\)\>" -syntax match juliaBaseTypeNum display "\<\%(U\?Int\%(8\|16\|32\|64\|128\)\?\|Float\%(16\|32\|64\)\|Complex\|Bool\|Char\|Number\|Signed\|Unsigned\|Integer\|AbstractFloat\|Real\|Rational\|Irrational\|Enum\|BigInt\|BigFloat\|MathConst\)\>" -syntax match juliaBaseTypeNum06 display "\" -syntax match juliaBaseTypeNum1011 display "\<\%(AbstractIrrational\|ComplexF\%(16\|32\|64\)\)\>" -syntax match juliaBaseTypeC display "\<\%(FileOffset\|C\%(u\?\%(char\|short\|int\|long\(long\)\?\|w\?string\)\|float\|double\|\%(ptrdiff\|s\?size\|wchar\|off\|u\?intmax\)_t\)\)\>" -syntax match juliaBaseTypeC1011 display "\" -syntax match juliaBaseTypeError display "\<\%(\%(Bounds\|Divide\|Domain\|\%(Stack\)\?Overflow\|EOF\|Undef\%(Ref\|Var\)\|System\|Type\|Parse\|Argument\|Key\|Load\|Method\|Inexact\|OutOfMemory\|Init\|Assertion\|Unicode\|ReadOnlyMemory\)Error\|\%(Interrupt\|Error\|ProcessExited\|Captured\|Composite\|InvalidState\|Null\|Remote\)Exception\|DimensionMismatch\|SegmentationFault\)\>" -syntax match juliaBaseTypeError1011 display "\<\%(StringIndexError\|MissingException\)\>" -syntax match juliaBaseTypeIter display "\<\%(EachLine\|Enumerate\|Cartesian\%(Index\|Range\)\|LinSpace\)\>" -syntax match juliaBaseTypeIter1011 display "\" -syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abstract\)\?String\>" -syntax match juliaBaseTypeString1011 display "\" -syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|SparseVector\|VecElement\|Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|RowVector\)\>" -syntax match juliaBaseTypeArray1011 display "\<\%(Broadcasted\|Adjoint\|Transpose\|LinearIndices\)\>" -syntax match juliaBaseTypeDict display "\<\%(WeakKey\)\?Dict\>" -syntax match juliaBaseTypeDict06 display "\" -syntax match juliaBaseTypeDict1011 display "\" -syntax match juliaBaseTypeSet display "\<\%(Set\|AbstractSet\)\>" -syntax match juliaBaseTypeSet06 display "\" -syntax match juliaBaseTypeSet1011 display "\<\%(BitSet\|AbstractDict\)\>" -syntax match juliaBaseTypeIO display "\<\%(IO\%(Stream\|Buffer\|Context\)\?\|RawFD\|StatStruct\|FileMonitor\|PollingFileWatcher\|Timer\|Base64\%(Decode\|Encode\)Pipe\|\%(UDP\|TCP\)Socket\|\%(Abstract\)\?Channel\|BufferStream\|ReentrantLock\)\>" -syntax match juliaBaseTypeIO1011 display "\" +syntax match juliaBaseTypeBasic display "\<\%(\%(N\|Named\)\?Tuple\|Symbol\|Function\|Union\%(All\)\?\|Type\%(Name\|Var\)\?\|Any\|ANY\|Vararg\|Ptr\|Exception\|Module\|Expr\|DataType\|\%(LineNumber\|Quote\)Node\|\%(Weak\|Global\)\?Ref\|Method\|Pair\|Val\|Nothing\|Some\|Missing\)\>" +syntax match juliaBaseTypeNum display "\<\%(U\?Int\%(8\|16\|32\|64\|128\)\?\|Float\%(16\|32\|64\)\|Complex\|Bool\|Char\|Number\|Signed\|Unsigned\|Integer\|AbstractFloat\|Real\|Rational\|\%(Abstract\)\?Irrational\|Enum\|BigInt\|BigFloat\|MathConst\|ComplexF\%(16\|32\|64\)\)\>" +syntax match juliaBaseTypeC display "\<\%(FileOffset\|C\%(u\?\%(char\|short\|int\|long\(long\)\?\|w\?string\)\|float\|double\|\%(ptrdiff\|s\?size\|wchar\|off\|u\?intmax\)_t\|void\)\)\>" +syntax match juliaBaseTypeError display "\<\%(\%(Bounds\|Divide\|Domain\|\%(Stack\)\?Overflow\|EOF\|Undef\%(Ref\|Var\)\|System\|Type\|Parse\|Argument\|Key\|Load\|Method\|Inexact\|OutOfMemory\|Init\|Assertion\|ReadOnlyMemory\|StringIndex\)Error\|\%(Interrupt\|Error\|ProcessExited\|Captured\|Composite\|InvalidState\|Missing\|\%(Process\|Task\)Failed\)Exception\|DimensionMismatch\|SegmentationFault\)\>" +syntax match juliaBaseTypeIter display "\<\%(EachLine\|Enumerate\|Cartesian\%(Index\|Range\)\|LinSpace\|CartesianIndices\)\>" +syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abstract\|Substitution\)\?String\>" +syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|\%(Sparse\|Row\)Vector\|VecElement\|Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|Broadcasted\|Adjoint\|Transpose\|LinearIndices\)\>" +syntax match juliaBaseTypeDict display "\<\%(WeakKey\|Id\|Abstract\)\?Dict\>" +syntax match juliaBaseTypeSet display "\<\%(\%(Abstract\|Bit\)\?Set\)\>" +syntax match juliaBaseTypeIO display "\<\%(IO\%(Stream\|Buffer\|Context\)\?\|RawFD\|StatStruct\|FileMonitor\|PollingFileWatcher\|Timer\|Base64\%(Decode\|Encode\)Pipe\|\%(UDP\|TCP\)Socket\|\%(Abstract\)\?Channel\|BufferStream\|ReentrantLock\|GenericIOBuffer\)\>" syntax match juliaBaseTypeProcess display "\<\%(Pipe\|Cmd\|PipeBuffer\)\>" -syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\|ExponentialBackOff\|StepRangeLen\)\>" -syntax match juliaBaseTypeRange06 display "\" -syntax match juliaBaseTypeRange1011 display "\<\(Abstract\|Lin\)Range\>" +syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Abstract\|Lin\|Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\|ExponentialBackOff\|StepRangeLen\)\>" syntax match juliaBaseTypeRegex display "\" syntax match juliaBaseTypeFact display "\<\%(Factorization\|BunchKaufman\|\%(Cholesky\|QR\)\%(Pivoted\)\?\|\%(Generalized\)\?\%(Eigen\|SVD\|Schur\)\|Hessenberg\|LDLt\|LQ\|LU\)\>" syntax match juliaBaseTypeSort display "\<\%(Insertion\|\(Partial\)\?Quick\|Merge\)Sort\>" syntax match juliaBaseTypeRound display "\" syntax match juliaBaseTypeSpecial display "\<\%(LocalProcess\|ClusterManager\)\>" syntax match juliaBaseTypeRandom display "\<\%(AbstractRNG\|MersenneTwister\|RandomDevice\)\>" -syntax match juliaBaseTypeDisplay display "\<\%(Text\(Display\)\?\|Display\|MIME\|HTML\)\>" -syntax match juliaBaseTypeDisplay1011 display "\" +syntax match juliaBaseTypeDisplay display "\<\%(Text\(Display\)\?\|\%(Abstract\)\?Display\|MIME\|HTML\)\>" syntax match juliaBaseTypeTime display "\<\%(Date\%(Time\)\?\|DateFormat\)\>" syntax match juliaBaseTypeOther display "\<\%(RemoteRef\|Task\|Condition\|VersionNumber\|IPv[46]\|SerializationState\|WorkerConfig\|Future\|RemoteChannel\|IPAddr\|Stack\%(Trace\|Frame\)\|\(Caching\|Worker\)Pool\|AbstractSerializer\)\>" syntax match juliaConstNum display "\%(\<\%(\%(NaN\|Inf\)\%(16\|32\|64\)\?\|pi\|π\)\>\)" -syntax match juliaConstNum06 display "\%(\<\%(eu\?\|eulergamma\|γ\|catalan\|φ\|golden\)\>\)" " Note: recognition of ℯ, which Vim does not consider a valid identifier, is " complicated. We detect possible uses by just looking for the character (for " performance) and then check that it's actually used by its own. " (This also tries to detect preceding number constants; it does so in a crude " way.) syntax match juliaPossibleEuler "ℯ" contains=juliaEuler -exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . ']\|' . s:operators . '\)\%([.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze\%($\|[' . s:nonidS_chars . ']\|' . s:operators . '\)"' +exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . ']\|' . s:operators . '\)\%([.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=ℯ\ze\%($\|[' . s:nonidS_chars . ']\|' . s:operators . '\)"' syntax match juliaConstBool display "\<\%(true\|false\)\>" -syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|OS_NAME\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|JULIA_HOME\|PROGRAM_FILE\)\>" -syntax match juliaConstEnv1011 display "\" -syntax match juliaConstIO06 display "\<\%(STD\%(OUT\|IN\|ERR\)\|DevNull\)\>" -syntax match juliaConstIO1011 display "\<\%(std\%(out\|in\|err\)\|devnull\)\>" -syntax match juliaConstC display "\<\%(WORD_SIZE\|C_NULL\)\>" -syntax match juliaConstGeneric display "\<\%(nothing\|Main\)\>" -syntax match juliaConstGeneric1011 display "\<\%(undef\|missing\)\>" +syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|PROGRAM_FILE\|DEPOT_PATH\)\>" +syntax match juliaConstIO display "\<\%(std\%(out\|in\|err\)\|devnull\)\>" +syntax match juliaConstC display "\<\%(C_NULL\)\>" +syntax match juliaConstGeneric display "\<\%(nothing\|Main\|undef\|missing\)\>" syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro @@ -299,7 +242,7 @@ exec 'syntax match juliaOperator "' . s:operators . '"' syntax match juliaRangeOperator display ":" -exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|^\s*:\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol' +exec 'syntax region juliaTernaryRegion matchgroup=juliaTernaryOperator start="\s\zs?\ze\s" skip="\%(:\(:\|[^:[:space:]'."'".'"({[]\+\s*\ze:\)\|\%(?\s*\)\@'.s:d(6).'<=:(\)" end=":" contains=@juliaExpressions,juliaErrorSemicol' let s:interp_dollar = '\([' . s:nonidS_chars . s:uniop_chars . s:binop_chars . '!?]\|^\)\@'.s:d(1).'<=\$' @@ -367,7 +310,7 @@ " this is used to restrict the search for Symbols to when colons appear at all " (for performance reasons) -syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon +syntax match juliaPossibleSymbol transparent ":\ze[^:]" contains=juliaSymbol,juliaQuotedParBlock,juliaQuotedQMarkPar,juliaColon let s:quotable = '\%(' . s:idregex . '\|?\|' . s:operators . '\|' . s:float_regex . '\|' . s:int_regex . '\)' let s:quoting_colon = '\%(\%(^\s*\|\s\{6,\}\|[' . s:nonid_chars . s:uniop_chars . s:binop_chars . '?]\s*\)\@'.s:d(6).'<=\|\%(\<\%(return\|if\|else\%(if\)\?\|while\|try\|begin\)\s*\)\@'.s:d(9).'<=\)\zs:' @@ -403,7 +346,7 @@ " :hi link juliaParDelim Delimiter hi def link juliaParDelim juliaNone hi def link juliaSemicolon juliaNone -hi def link juliaComma juliaNone +hi def link juliaComma juliaNone hi def link juliaColon juliaOperator @@ -412,12 +355,11 @@ hi def link juliaInfixKeyword Keyword hi def link juliaRepKeyword Keyword hi def link juliaBlKeyword Keyword -exec 'hi! def link juliaBlKeyword06 ' . (b:julia_syntax_version == 6 ? 'Keyword' : b:julia_syntax_version == 10 ? 'juliaDeprecated' : 'NONE') hi def link juliaConditional Conditional hi def link juliaRepeat Repeat hi def link juliaException Exception hi def link juliaTypedef Keyword -exec 'hi! def link juliaOuter ' . (b:julia_syntax_version >= 10 ? 'Keyword' : 'NONE') +hi def link juliaOuter Keyword hi def link juliaBaseTypeBasic Type hi def link juliaBaseTypeNum Type hi def link juliaBaseTypeC Type @@ -439,24 +381,13 @@ hi def link juliaBaseTypeDisplay Type hi def link juliaBaseTypeTime Type hi def link juliaBaseTypeOther Type -for t in ["Num", "Range", "Dict", "Set"] - let h = b:julia_syntax_version == 6 ? "Type" : b:julia_syntax_version == 10 ? "juliaDeprecated" : "NONE" - exec "hi! def link juliaBaseType" . t . "06 " . h -endfor -for t in ["Range", "Dict", "Set", "Basic", "C", "Array", "Iter", "Display", "IO", "Num", "Error", "String"] - let h = b:julia_syntax_version >= 10 ? "Type" : "NONE" - exec "hi! def link juliaBaseType" . t . "1011 " . h -endfor " NOTE: deprecated constants are not highlighted as such. For once, " one can still legitimately use them by importing Base.MathConstants. " Plus, one-letter variables like `e` and `γ` can be used with other " meanings. hi def link juliaConstNum Constant -let h = b:julia_syntax_version == 6 ? "Constant" : "NONE" -exec "hi! def link juliaConstNum06 " . h -let h = b:julia_syntax_version >= 10 ? "Constant" : "NONE" -exec "hi! def link juliaEuler " . h +hi def link juliaEuler Constant hi def link juliaConstEnv Constant hi def link juliaConstC Constant @@ -464,13 +395,7 @@ hi def link juliaConstGeneric Constant hi def link juliaRangeEnd Constant hi def link juliaConstBool Boolean - -for t in ["Generic", "IO", "Env"] - let h = b:julia_syntax_version >= 10 ? "Constant" : "NONE" - exec "hi! def link juliaConst" . t . "1011 " . h -endfor -let h = b:julia_syntax_version == 6 ? "Constant" : b:julia_syntax_version == 10 ? "juliaDeprecated" : "NONE" -exec "hi! def link juliaConstIO06 " . h +hi def link juliaConstIO Boolean hi def link juliaComprehensionFor Keyword hi def link juliaComprehensionIf Keyword @@ -483,7 +408,7 @@ hi def link juliaQParDelim Identifier hi def link juliaQuotedQMarkPar Identifier hi def link juliaQuotedQMarkParS Identifier -hi def link juliaQuotedQMark juliaOperatorHL +hi def link juliaQuotedQMark juliaOperatorHL hi def link juliaNumber Number hi def link juliaFloat Float @@ -519,7 +444,7 @@ hi def link juliaUniCharSmall SpecialChar hi def link juliaUniCharLarge SpecialChar hi def link juliaDoubleBackslash SpecialChar -hi def link juliaEscapedQuote SpecialChar +hi def link juliaEscapedQuote SpecialChar hi def link juliaPrintfFmt SpecialChar @@ -548,12 +473,6 @@ hi def link juliaError Error -if b:julia_syntax_highlight_deprecated == 1 - hi! def link juliaDeprecated Todo -else - hi! def link juliaDeprecated NONE -end - syntax sync fromstart let b:current_syntax = "julia"