summaryrefslogtreecommitdiff
path: root/runtime/indent/haml.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-21 12:05:36 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-21 12:05:36 +0200
commit7a329911b9ae2b97453fd995bc3a6523cf3aab53 (patch)
treeb75f6a117f48fe0c441b67cca09490f623233a74 /runtime/indent/haml.vim
parentc6af8125c7593b3ca104bf1feac0d814fe76d92d (diff)
downloadvim-git-7a329911b9ae2b97453fd995bc3a6523cf3aab53.tar.gz
Updated runtime files.
Diffstat (limited to 'runtime/indent/haml.vim')
-rw-r--r--runtime/indent/haml.vim14
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/indent/haml.vim b/runtime/indent/haml.vim
index c1feee09a..079bd0513 100644
--- a/runtime/indent/haml.vim
+++ b/runtime/indent/haml.vim
@@ -1,7 +1,7 @@
" Vim indent file
-" Language: HAML
-" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
-" Last Change: 2007 Dec 16
+" Language: Haml
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Last Change: 2008 Sep 11
if exists("b:did_indent")
finish
@@ -44,8 +44,6 @@ function! GetHamlIndent()
if indent == indent(lnum)
let indent = cindent <= indent ? -1 : increase
endif
- "let indent = indent == indent(lnum) ? -1 : indent
- "let indent = indent > indent(lnum) + &sw ? indent(lnum) + &sw : indent
let group = synIDattr(synID(lnum,lastcol,1),'name')
@@ -53,9 +51,11 @@ function! GetHamlIndent()
return indent
elseif line =~ '^/\%(\[[^]]*\]\)\=$'
return increase
- elseif line =~ '^:'
+ elseif group == 'hamlFilter'
return increase
- elseif line =~ '^'.s:tag.'[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\<end\>\)\@!\|.*do |[^|]*|\s*$\)'
+ elseif line =~ '^'.s:tag.'[&!]\=[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\<end\>\)\@!\|.*do\%(\s*|[^|]*|\)\=\s*$\)'
+ return increase
+ elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$'
return increase
elseif line == '-#'
return increase