diff --git a/example/example.swift b/example/example.swift index 772efef..804d53a 100644 --- a/example/example.swift +++ b/example/example.swift @@ -314,6 +314,12 @@ guard let path = NSBundle.mainBundle().pathForResource(imageName, ofType: "png") { } +UIView.animateWithDuration(duration, delay: 0, usingSpringWithDamping: 0.8, initialSpringVelocity: 0, options: .CurveEaseInOut, animations: { + view.backgroundColor = UIColor.redColor() +}) { finished in + print("indent?") +} + // Indent last line should hold self.init(className: "Item", dictionary: [ "identifier": item.identifier, diff --git a/indent/swift.vim b/indent/swift.vim index e2ed72d..4f41c2d 100644 --- a/indent/swift.vim +++ b/indent/swift.vim @@ -207,6 +207,11 @@ function! SwiftIndent(...) return indent(openingParen) + shiftwidth() endif + " - Previous line has close then open braces, indent previous + 1 'sw' + if previous =~ "}.*{" + return previousIndent + shiftwidth() + endif + let line = line(".") let column = col(".") call cursor(previousNum, column)