diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-05-11 15:05:13 +0200 |
commit | 271b63d71707720ad0d35590b8cb50f8f8f43014 (patch) | |
tree | 1b71daa457afc68465f66ee2afc9a00c1380f23d /indent/elixir.vim | |
parent | acd7ce59503b22ac7663fc25776efe25e266f1d4 (diff) | |
download | vim-polyglot-1.13.2.tar.gz vim-polyglot-1.13.2.zip |
Updatev1.13.2
Diffstat (limited to 'indent/elixir.vim')
-rw-r--r-- | indent/elixir.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indent/elixir.vim b/indent/elixir.vim index 92b98460..636097b7 100644 --- a/indent/elixir.vim +++ b/indent/elixir.vim @@ -25,6 +25,7 @@ let s:block_skip = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '" . s:s let s:block_start = 'do\|fn' let s:block_middle = 'else\|match\|elsif\|catch\|after\|rescue' let s:block_end = 'end' +let s:symbols_end = '\]\|}' let s:arrow = '^.*->$' let s:pipeline = '^\s*|>.*$' @@ -59,7 +60,11 @@ function! GetElixirIndent() let ind += opened_symbol * &sw - if current_line =~ '^\s*\(\]\|}\)' + if last_line =~ '^\s*\(' . s:symbols_end . '\)' + let ind += &sw + endif + + if current_line =~ '^\s*\(' . s:symbols_end . '\)' let ind -= &sw endif |