" Author: Eric Van Dewoestine
"
" Description: {{{
" Html indent file using IndentAnything.
"
" License:
"
" Copyright (C) 2005 - 2014 Eric Van Dewoestine
"
" This program is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by
" the Free Software Foundation, either version 3 of the License, or
" (at your option) any later version.
"
" This program is distributed in the hope that it will be useful,
" but WITHOUT ANY WARRANTY; without even the implied warranty of
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
" GNU General Public License for more details.
"
" You should have received a copy of the GNU General Public License
" along with this program. If not, see .
"
" }}}
if &indentexpr =~ 'EclimGetHtmlIndent' ||
\ (!exists('b:disableOverride') && exists('g:EclimHtmlIndentDisabled'))
finish
endif
let b:disableOverride = 1
runtime! indent/javascript.vim
runtime! indent/css.vim
setlocal indentexpr=EclimGetHtmlIndent(v:lnum)
setlocal indentkeys+=>,},0),0},),;,0{,!^F,o,O
if !exists('g:EclimHtmlUnclosedTags')
let g:EclimHtmlUnclosedTags = ['br', 'img', 'input']
endif
" EclimGetHtmlIndent(lnum) {{{
function! EclimGetHtmlIndent(lnum)
let line = line('.')
let col = line('.')
let adj = 0
let scriptstart = search('', 'cW')
endif
call cursor(line, col)
let stylestart = search('', 'cW')
endif
call cursor(line, col)
" Inside