diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-04-25 21:03:34 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-04-25 21:03:34 +0200 |
commit | 68b2748af117b56208f25678c4b465af00dc64c5 (patch) | |
tree | f9038064b78513b3f99edb574cdd2943bd2fd633 /indent/julia.vim | |
parent | 14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 (diff) | |
download | vim-polyglot-68b2748af117b56208f25678c4b465af00dc64c5.tar.gz vim-polyglot-68b2748af117b56208f25678c4b465af00dc64c5.zip |
Update
Diffstat (limited to 'indent/julia.vim')
-rw-r--r-- | indent/julia.vim | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/indent/julia.vim b/indent/julia.vim index 97dd7bc6..59cd7d80 100644 --- a/indent/julia.vim +++ b/indent/julia.vim @@ -370,23 +370,13 @@ function GetJuliaIndent() " Analyse the reference line let [num_open_blocks, num_closed_blocks] = GetJuliaNestingStruct(lnum, st, lim) - - " Increase indentation for each newly opened block - " in the reference line - while num_open_blocks > 0 - let ind += &sw - let num_open_blocks -= 1 - endwhile + " Increase indentation for each newly opened block in the reference line + let ind += shiftwidth() * num_open_blocks " Analyse the current line let [num_open_blocks, num_closed_blocks] = GetJuliaNestingStruct(v:lnum) - - " Decrease indentation for each closed block - " in the current line - while num_closed_blocks > 0 - let ind -= &sw - let num_closed_blocks -= 1 - endwhile + " Decrease indentation for each closed block in the current line + let ind -= shiftwidth() * num_closed_blocks return ind endfunction |