From 271b63d71707720ad0d35590b8cb50f8f8f43014 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Mon, 11 May 2015 15:05:13 +0200 Subject: Update --- indent/typescript.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indent/typescript.vim') diff --git a/indent/typescript.vim b/indent/typescript.vim index f498298b..78d04c5c 100644 --- a/indent/typescript.vim +++ b/indent/typescript.vim @@ -3,6 +3,10 @@ " Maintainer: None! Wanna improve this? " Last Change: 2015 Mar 07 +if get(g:, 'typescript_indent_disable') + finish +endif + " Only load this indent file when no other was loaded. if exists("b:did_indent") finish @@ -54,6 +58,12 @@ function GetTypescriptIndent() return indent(prev) endif + " If a variable was declared and the semicolon omitted, do not indent + " the next line + if getline(prev) =~ '^\s*var\s\+\w\+' + return indent(prev) + endif + " Try to find out whether the last `}` ended a ` : {` block if getline(prev) =~ '};\s*$' " jump to matching `{` bracket -- cgit v1.2.3