On Dec 5, 12:59 pm, Rick R <[email protected]> wrote: > In IDEA I can get formatting of a JSPs perfectly. Eclipse sucks at it and > vim (which I'm not using for my groovy project) hasn't been much better for > me. > > Here is the before > JSP:http://img.skitch.com/20091205-d2j2b7x5c9t467f33smwxa1amm.jpg > > and then in vim after gg=G it ends up looking pretty > bad:http://img.skitch.com/20091205-1w2bmmx223y7s2ucjmnw4xdne8.jpg > > Using IDEA the same file turns out > fine:http://img.skitch.com/20091205-d12p7165x21bhg3x3mw532w3jy.jpg >
I don't know what JSP is, but I notice that $VIMRUNTIME/indent/jsp.vim contains (pretty much) only the following: > " If there has been no specific JSP indent script created, > " use the default html indent script which will handle > " html, javascript and most of the JSP constructs. > runtime! indent/html.vim So (assuming you are using the filetype indent rules for jsp), unless you have downloaded a "real" indent script for JSP, any non-HTML/ javascript constructs (such as "stripes") will most likely never be indented correctly by the script. It might be a good idea to search for a JSP indent plugin for Vim on www.vim.org or just on your favorite search engine. If you can't find one, perhaps you can create your own rules in $HOME/.vim/indent/ jsp.vim (or vimfiles instead of .vim on Windows). See :help 'indentexpr' and the various :help sections linked therein to get started, possibly using $VIMRUNTIME/indent/html.vim as a starting point. -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php
