Hi all.

I've recently edited a bunch of html files containing JS code and I
didn't like default indentation.
I've tried "html improved indentation"
(http://www.vim.org/scripts/script.php?script_id=1830), but didn't
like it too.
The result of my story is combination of default html indentation and
"OOP javascript indentation" script by Ryan Fabella
(http://www.vim.org/scripts/script.php?script_id=1936).
Script is in attachment.

Known problems:
  for(...)
    if(...)
     some_code;
    next-line-goes-here;
  while-it-must-be-here;

  for(...){if(...)
   next-line-is-here
  next-line-goes-here
   while-it-must-be-here;
  }

At the monent I don't have time to those issues. If someone could do
this I would be very appreciated. Or show existing variants :).

P.S. This script (the same as initial version by Ryan Fabella) is
based on regexps, so it can't handle all variations correctly.
To handle all situations correctly full futured JS analyzer required.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Attachment: html.vim
Description: Binary data

Reply via email to