From d43b70d93987c94d15a352cf0026fb93d3317cc8 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 26 Dec 2018 10:41:57 +0100 Subject: Update --- ftplugin/julia.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ftplugin/julia.vim') diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index caddabaf..bed55a8f 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -34,7 +34,10 @@ if exists("loaded_matchit") " note: begin_keywords must contain all blocks in order " for nested-structures-skipping to work properly let b:julia_begin_keywords = '\%(\%(\.\s*\)\@' - let s:macro_regex = '@\%(#\@!\S\)\+\s\+' + " 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 + let s:macro_regex = '\%(@\%(#\@!\S\)\+\|\<\%(local\|global\)\)\s\+' let s:nomacro = '\%(' . s:macro_regex . '\)\@') =~# '\<\%(global\|local\)\>' normal! W if line('.') > l || col('.') == c1 call cursor(l, c) -- cgit v1.2.3