I can\'t seem to get inline Javascript indenting properly in Vim. Consider the following:
$(document).ready(function() {
// Closing brace correctly inde
I had this same issue. This is the best of all Javascript indentation scripts:
http://www.vim.org/scripts/script.php?script_id=1840
It requires the IndentAnything plugin
http://www.vim.org/scripts/script.php?script_id=1839
As an added bonus, I wrote this indent script that will make Javascript blocks quite pretty. It uses the default html indenter by default (and the IndentAnything one when within a Javascript block)
http://gist.github.com/371902