From 283e12bded089fa4d8033c1606741e1daaed49e8 Mon Sep 17 00:00:00 2001 From: "jiangfriend@gmail.com" Date: Wed, 14 Dec 2011 13:17:27 +0800 Subject: [PATCH] Fixes auto indent incorrect in JavaScript --- plugin/auto-pairs.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugin/auto-pairs.vim b/plugin/auto-pairs.vim index b743668..14c075c 100644 --- a/plugin/auto-pairs.vim +++ b/plugin/auto-pairs.vim @@ -165,7 +165,14 @@ function! AutoPairsReturn() if g:AutoPairsCenterLine && winline() * 1.5 >= winheight(0) let cmd = " \zz\cl" end - return "\\".cur_char."\k==o".cmd + " conflict from javascript and coffee + " javascript need indent new line + " coffeescript forbid indent new line + if &filetype == 'coffeescript' + return "\\".cur_char."\k==o".cmd + else + return "\\".cur_char."\=ko".cmd + endif end return "\" endfunction