diff options
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/julia.vim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index c03ac30b..90cc49e3 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -31,9 +31,11 @@ let b:undo_ftplugin = "setlocal include< suffixesadd< comments< commentstring<" if exists("loaded_matchit") let b:match_ignorecase = 0 - " note: begin_keywords must contain all blocks in order + " note: begin_keywords must contain all blocks, in order " for nested-structures-skipping to work properly - let b:julia_begin_keywords = '\%(\%(\.\s*\)\@<!\|\%(@\s*.\s*\)\@<=\)\<\%(\%(staged\)\?function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|\%(\(abstract\|primitive\)\s\+\)\@<!type\|immutable\|let\|do\|\%(bare\)\?module\|quote\|if\|for\|while\|try\)\>' + " note: 'mutable struct' and 'strcut' 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\)\>' " 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 @@ -77,7 +79,7 @@ if exists("loaded_matchit") " the 'end' keyword when it is used as a range rather than as " the end of a block let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ ' - \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeEnd\\|SymbolS\\?\\|Comment[LM]\\|\\%([bv]\\|ip\\|MIME\\|Shell\\|Doc\\)\\?String\\|RegEx\\)\\>"' + \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|SymbolS\\?\\|Comment[LM]\\|\\%([bv]\\|ip\\|MIME\\|Shell\\|Doc\\)\\?String\\|RegEx\\)\\>"' let b:undo_ftplugin = b:undo_ftplugin \ . " | unlet! b:match_words b:match_skip b:match_ignorecase" |