Skip to content

Instantly share code, notes, and snippets.

@mikelikespie
Created April 20, 2010 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikelikespie/371902 to your computer and use it in GitHub Desktop.
Save mikelikespie/371902 to your computer and use it in GitHub Desktop.
" Vim indent file
" Language: html
" Maintainer: what's that? <lol@lol.com>
" URL: hah
" Anon CVS: hah
" Release Coordinator: Mike Lewis <mikelikespie@gmail.com>
"
runtime! indent/javascript.vim
unlet! b:did_indent
sou $VIMRUNTIME/indent/html.vim
let b:html_indentexpr = &l:indentexpr
setlocal indentexpr=GetMyHTMLIndent()
function! GetMyHTMLIndent(...)
if exists("*IndentAnything") && synIDattr(synID(v:lnum,1,1),'name') ==? 'javaScript'
return IndentAnything()
else
exe "let ind = ".b:html_indentexpr
return ind
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment