diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2014-12-09 23:09:20 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-12-09 23:09:20 +0100 |
commit | 4071c094c69ba8ef716f8048cac8415fc7d96e26 (patch) | |
tree | ccf17bae58ed7655d62a7bce6104f31480976dc6 /indent/elixir.vim | |
parent | 617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1 (diff) | |
download | vim-polyglot-4071c094c69ba8ef716f8048cac8415fc7d96e26.tar.gz vim-polyglot-4071c094c69ba8ef716f8048cac8415fc7d96e26.zip |
Updatev1.10.4
Diffstat (limited to 'indent/elixir.vim')
-rw-r--r-- | indent/elixir.vim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indent/elixir.vim b/indent/elixir.vim index 3563f44a..92b98460 100644 --- a/indent/elixir.vim +++ b/indent/elixir.vim @@ -12,7 +12,6 @@ setlocal nosmartindent setlocal indentexpr=GetElixirIndent() setlocal indentkeys+=0=end,0=else,0=match,0=elsif,0=catch,0=after,0=rescue -setlocal indentkeys+==-> if exists("*GetElixirIndent") finish @@ -69,9 +68,16 @@ function! GetElixirIndent() endif " if line starts with pipeline + " and last line contains pipeline(s) + " align them + if last_line =~ '|>.*$' && + \ current_line =~ s:pipeline + let ind = float2nr(match(last_line, '|>') / &sw) * &sw + + " if line starts with pipeline " and last line is an attribution " indents pipeline in same level as attribution - if current_line =~ s:pipeline && + elseif current_line =~ s:pipeline && \ last_line =~ '^[^=]\+=.\+$' let b:old_ind = ind let ind = float2nr(matchend(last_line, '=\s*[^ ]') / &sw) * &sw |