[slim-vim] vim indentation
Stephen Horner
sphorner at gmail.com
Wed Mar 22 18:10:51 CST 2006
Ok, I'll be very honest; I cannot for the life of me see myself
committing to learning exactly how to write a new
~/.vim/indent/lisp.vim file to indent lisp code properly. I've looked
through a few examples like ruby's and pythons, and ran away (crying I
might add.). What I would like to know is how doable it would be to
do something similar to what we currently do with \es except have it
pass the sexpr to ecl(?) to format the expression, and then have it
replace the current code?
An example of why I think fixing the vim lisp indentor is the
following code from the allegroserve tutorial...
(publish :path "/hello-count"
:content-type "text/html"
:function
(let ((count 0))
#'(lambda (req ent)
(with-http-response (req ent)
(with-http-body (req ent)
(html
(:html
(:head (:title "Hello Counter"))
(:body
((:font :color (nth (random 5)
'("red" "blue"
"green" "purple"
"black")))
"Hello World had been called "
(:princ (incf count))
" times")))))))))
Nice, and purdy. And now how it looked when I wrote it in vim...
(publish :path "/hello-count"
:content-type "text/html"
:function
(let ((count 0))
#'(lambda (req ent)
(with-http-response (req ent)
(with-http-body (req ent)
(html
(:html
(:head (:title
"Hello Counter"))
(:body
((:font :color
(nth (random 5)
'("red" "blue"
"green" "purple"
"black")))
"Hello World had
been called "
(:princ (incf count))
" times")))))))))
As you can see (and I assume many of you are already well aware of)
this is simply awful. I know I cannot complain since this is "free"
software, but MAN (lol sorry) this is bad.
Anyways any suggestions would be great.
Regards,
Stephen Horner
More information about the slim-vim
mailing list