diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-03-05 12:30:24 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-03-05 12:30:24 +0100 |
commit | e86e0ad36ef9501acbc3e8c63a1d4fab104e47cb (patch) | |
tree | b9581527c6b4c0590bc79d5fd8ea5cfaf8df6d12 /ftplugin | |
parent | 45ab4d80dd52f6ea40d8e9b7fa5cedd31d9ad9ec (diff) | |
download | vim-polyglot-e86e0ad36ef9501acbc3e8c63a1d4fab104e47cb.tar.gz vim-polyglot-e86e0ad36ef9501acbc3e8c63a1d4fab104e47cb.zip |
Update
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" |