summaryrefslogtreecommitdiffstats
path: root/ftplugin/julia.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-06-09 09:50:19 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2021-06-09 09:50:19 +0200
commitff8c1d76741f148d5f6efb9a57119dcf11afaec6 (patch)
tree2717f611f45d2a82d83ae1e320af4f3aa33b4264 /ftplugin/julia.vim
parent27756b129b7a1f9763a0062aafa8fd35b0181b19 (diff)
downloadvim-polyglot-ff8c1d76741f148d5f6efb9a57119dcf11afaec6.tar.gz
vim-polyglot-ff8c1d76741f148d5f6efb9a57119dcf11afaec6.zip
Update
Diffstat (limited to 'ftplugin/julia.vim')
-rw-r--r--ftplugin/julia.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim
index 785ffa2a..39126598 100644
--- a/ftplugin/julia.vim
+++ b/ftplugin/julia.vim
@@ -39,7 +39,7 @@ if exists("loaded_matchit")
" for nested-structures-skipping to work properly
" note: 'mutable struct' and 'struct' are defined separately because
" using \? puts the cursor on 'struct' instead of 'mutable' for some reason
- let b:julia_begin_keywords = '\%(\%(\.\s*\)\@<!\|\%(@\s*.\s*\)\@<=\)\<\%(function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|do\|\%(bare\)\?module\|quote\|if\|for\|while\|try\)\>'
+ let b:julia_begin_keywords = '\%(\.\s*\|@\)\@<!\<\%(function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|do\|\%(bare\)\?module\|quote\|if\|for\|while\|try\)\>'
" note: the following regex not only recognizes macros, but also local/global keywords.
" the purpose is recognizing things like `@inline myfunction()`
" or `global myfunction(...)` etc, for matchit and block movement functionality
@@ -67,7 +67,7 @@ if exists("loaded_matchit")
call cursor(l, c)
if attr == 'juliaConditional'
return b:julia_begin_keywordsm . ':\<\%(elseif\|else\)\>:' . b:julia_end_keywords
- elseif attr =~ '\<\%(juliaRepeat\|juliaRepKeyword\)\>'
+ elseif attr =~# '\<\%(juliaRepeat\|juliaRepKeyword\)\>'
return b:julia_begin_keywordsm . ':\<\%(break\|continue\)\>:' . b:julia_end_keywords
elseif attr == 'juliaBlKeyword'
return b:julia_begin_keywordsm . ':' . b:julia_end_keywords
@@ -82,8 +82,8 @@ if exists("loaded_matchit")
" we need to skip everything within comments, strings and
" the 'begin' and 'end' keywords when they are used as a range rather than as
" the delimiter of a block
- let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ '
- \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|Comment\\%([LM]\\|Delim\\)\\|\\%([bs]\\|Shell\\|Printf\\|Doc\\)\\?String\\|StringPrefixed\\|DocStringM\\(Raw\\)\\?\\|RegEx\\|SymbolS\\?\\|Macro\\|Dotted\\)\\>"'
+ let b:match_skip = 'synIDattr(synID(line("."),col("."),0),"name") =~# '
+ \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|Comment\\%([LM]\\|Delim\\)\\|\\%([bs]\\|Shell\\|Printf\\|Doc\\)\\?String\\|StringPrefixed\\|DocStringM\\(Raw\\)\\?\\|RegEx\\|SymbolS\\?\\|Dotted\\)\\>"'
let b:undo_ftplugin = b:undo_ftplugin
\ . " | unlet! b:match_words b:match_skip b:match_ignorecase"