diff options
author | Dan Reif <dan.reif@collectivehealth.com> | 2018-04-30 12:00:42 -0700 |
---|---|---|
committer | Dan Reif <dan.reif@collectivehealth.com> | 2018-04-30 12:00:42 -0700 |
commit | 3e0c887365bc1ebd55b91dd69ab73f2dee1f00ed (patch) | |
tree | ce76003a08274cb805df101a44be8d37af1a4c4b /indent/julia.vim | |
parent | b4d7993e7ea554153025c5072749f415e69e0323 (diff) | |
download | vim-polyglot-3e0c887365bc1ebd55b91dd69ab73f2dee1f00ed.tar.gz vim-polyglot-3e0c887365bc1ebd55b91dd69ab73f2dee1f00ed.zip |
Update (periodic rebuild)
I originally meant to run this before adding haproxy, but accidentally
pushed that into my branch. If you'd like to see that content, it's at
https://github.com/CH-DanReif/vim-polyglot/commit/414ad25c3ad1ab9c4b6a99fe4f08d6c30b7e0f57.
Diffstat (limited to 'indent/julia.vim')
-rw-r--r-- | indent/julia.vim | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/indent/julia.vim b/indent/julia.vim index 4833d7e5..88e90e57 100644 --- a/indent/julia.vim +++ b/indent/julia.vim @@ -27,13 +27,13 @@ function JuliaMatch(lnum, str, regex, st, ...) let s = a:st let e = a:0 > 0 ? a:1 : -1 while 1 - let f = match(a:str, a:regex, s) + let f = match(a:str, '\C' . a:regex, s) if e >= 0 && f >= e return -1 endif if f >= 0 let attr = synIDattr(synID(a:lnum,f+1,1),"name") - if attr =~ s:skipPatterns + if attr =~# s:skipPatterns let s = f+1 continue endif @@ -84,7 +84,7 @@ function GetJuliaNestingStruct(lnum, ...) let i = JuliaMatch(a:lnum, line, '@\@<!\<else\>', s) if i >= 0 && i == fb let s = i+1 - if len(blocks_stack) > 0 && blocks_stack[-1] =~ '\<\%(else\)\=if\>' + if len(blocks_stack) > 0 && blocks_stack[-1] =~# '\<\%(else\)\=if\>' let blocks_stack[-1] = 'else' else call add(blocks_stack, 'else') @@ -135,7 +135,7 @@ function GetJuliaNestingStruct(lnum, ...) let i = JuliaMatch(a:lnum, line, '@\@<!\<\%(while\|for\|\%(staged\)\?function\|macro\|begin\|\%(mutable\s\+\)\?struct\|\%(\%(abstract\|primitive\)\s\+\)\?type\|immutable\|let\|quote\|do\)\>', s) if i >= 0 && i == fb - if match(line, '\<\%(mutable\|abstract\|primitive\)', i) != -1 + if match(line, '\C\<\%(mutable\|abstract\|primitive\)', i) != -1 let s = i+11 else let s = i+1 @@ -290,16 +290,11 @@ function LastBlockIndent(lnum) endfunction function GetJuliaIndent() - let s:save_ignorecase = &ignorecase - set noignorecase - " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) " At the start of the file use zero indent. if lnum == 0 - let &ignorecase = s:save_ignorecase - unlet s:save_ignorecase return 0 endif @@ -387,8 +382,6 @@ function GetJuliaIndent() let num_closed_blocks -= 1 endwhile - let &ignorecase = s:save_ignorecase - unlet s:save_ignorecase return ind endfunction |