diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-18 22:51:23 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2013-09-18 22:51:23 +0200 |
commit | 235a5631f96ca7613d0fe48fe3731a8ce76e436d (patch) | |
tree | 58fe585102a5dd1ed5b8b9efc202c6a880cafaa0 /indent/elixir.vim | |
parent | edf1aa4a1cc7993b33352870e099d1298d14f67f (diff) | |
download | vim-polyglot-235a5631f96ca7613d0fe48fe3731a8ce76e436d.tar.gz vim-polyglot-235a5631f96ca7613d0fe48fe3731a8ce76e436d.zip |
Update latex-box and elixir
Diffstat (limited to 'indent/elixir.vim')
-rw-r--r-- | indent/elixir.vim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indent/elixir.vim b/indent/elixir.vim index 54bc8289..e4798141 100644 --- a/indent/elixir.vim +++ b/indent/elixir.vim @@ -39,8 +39,15 @@ function! GetElixirIndent(...) endif if synIDattr(synID(v:lnum, 1, 1), "name") !~ '\(Comment\|String\)$' + let splited_line = split(getline(lnum), '\zs') + let opened_symbol = 0 + let opened_symbol += count(splited_line, '[') - count(splited_line, ']') + let opened_symbol += count(splited_line, '{') - count(splited_line, '}') + + let ind += opened_symbol * &sw + if getline(lnum) =~ s:indent_keywords . - \ '\|^\s*\%(^.*[\[{(].*[,:]\|.*->\)$' + \ '\|^\s*\%(.*->\)$' let ind += &sw endif |