From 303b3f1b434f26f936c241789c84dca6e2f50df2 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 6 Dec 2015 11:31:38 +0100 Subject: Update all bundles --- indent/rust.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indent/rust.vim') diff --git a/indent/rust.vim b/indent/rust.vim index 3033f063..0a3c3344 100644 --- a/indent/rust.vim +++ b/indent/rust.vim @@ -123,6 +123,13 @@ function GetRustIndent(lnum) let prevlinenum = prevnonblank(prevlinenum - 1) let prevline = s:get_line_trimmed(prevlinenum) endwhile + + " Handle where clauses nicely: subsequent values should line up nicely. + if prevline[len(prevline) - 1] == "," + \ && prevline =~# '^\s*where\s' + return indent(prevlinenum) + 6 + endif + if prevline[len(prevline) - 1] == "," \ && s:get_line_trimmed(a:lnum) !~ '^\s*[\[\]{}]' \ && prevline !~ '^\s*fn\s' -- cgit v1.2.3