New Release of VimClojure: v1.2.0

0 views
Skip to first unread message

Meikel Brandmeyer

unread,
Aug 29, 2008, 6:35:46 PM8/29/08
to clo...@googlegroups.com
Dear Clojurians,

a new version of VimClojure is available. I tried to fix also the string
handling for the indenting. This should work now. Please note that there
is still some issue with a line ending in a comment containing a (. I'm
not sure how to fix this.

New in this release:

- I further refined the highlighting. The standard highlighting groups
are now used. Eg. Function, Macro, etc.

- The highlighting now uses the "default" flag to make them overridable
by the user.

- The highlighting synchronises with empty lines. (Stolen from
scheme.vim)

- The 'define' option is now used. This let's you eg. jump to the
definition of the word under the cursor.

- As already mentioned: fixed issue with indenting and multi-line
strings.

Please test this release since it is due for upstream inclusion in Vim.

The release may be found at the usual place:
http://kotka.de/projects/clojure/vimclojure.html

Sincerely
Meikel

Parth Malwankar

unread,
Aug 30, 2008, 8:53:14 AM8/30/08
to Clojure


On Aug 30, 3:35 am, Meikel Brandmeyer <m...@kotka.de> wrote:
> Dear Clojurians,
>
> a new version of VimClojure is available. I tried to fix also the string
> handling for the indenting. This should work now. Please note that there
> is still some issue with a line ending in a comment containing a (. I'm
> not sure how to fix this.
>
> New in this release:
>
> - I further refined the highlighting. The standard highlighting groups
>    are now used. Eg. Function, Macro, etc.
>
> - The highlighting now uses the "default" flag to make them overridable
>    by the user.
>
> - The highlighting synchronises with empty lines. (Stolen from
>    scheme.vim)
>
> - The 'define' option is now used. This let's you eg. jump to the
>    definition of the word under the cursor.
>
> - As already mentioned: fixed issue with indenting and multi-line
>    strings.
>
> Please test this release since it is due for upstream inclusion in Vim.
>

Thanks Meikel. The syntax highlighting seems much improved
from the earlier release.

Just found one minor issue.

defmulti formatting is like:
(defmulti foo :abc [n]
(println n))

With (pr.. being aligned with foo instead of ^(d.

You might also want to update the completions list as a bunch of
stuff has been added in the last few days (lib support, get-in,
printf etc)

Looking forward to seeing clj being supported by vim by
default :)
Will let you know if I come across something else.

Parth


> The release may be found at the usual place:
>    http://kotka.de/projects/clojure/vimclojure.html
>
> Sincerely
> Meikel
>
>  smime.p7s
> 5KViewDownload

Parth Malwankar

unread,
Aug 30, 2008, 9:02:25 AM8/30/08
to Clojure


On Aug 30, 5:53 pm, Parth Malwankar <parth.malwan...@gmail.com> wrote:
> On Aug 30, 3:35 am, Meikel Brandmeyer <m...@kotka.de> wrote:
>

> > Please test this release since it is due for upstream inclusion in Vim.
>

Sorry for the double post. Just wondering if you have
seen/used the lisp_rainbow support in Vim for CL.
Basically it highlights each paren pair in a separate color
upto 10 levels. If that is at all possible it will be
_really_ cool.

See. :h ft-lisp-syntax in vim.

Thanks.
Parth

Meikel Brandmeyer

unread,
Aug 31, 2008, 5:26:10 PM8/31/08
to clo...@googlegroups.com
Hello,

Am 30.08.2008 um 14:53 schrieb Parth Malwankar:

> Just found one minor issue.
>
> defmulti formatting is like:
> (defmulti foo :abc [n]
> (println n))
>
> With (pr.. being aligned with foo instead of ^(d.

I disagree. The format of defmulti is:

> (defmulti name dispatch-fn [default-dispatch-val])

So one example usage would be:

---8<---
(defmulti sign (fn [x]
(if (< 0 x)
:negative
:positive)))
---8<---

The syntax you are referring to is the one of defmethod. This already
behaves as you requested. In case you want defmulti to behave the same,
you might put the following line in your .vim/after/indent/clojure.vim:

---8<---
setlocal lispwords+=defmulti
---8<---

> You might also want to update the completions list as a bunch of
> stuff has been added in the last few days (lib support, get-in,
> printf etc)

Hehe. It's hard to stay up-to-date at the moment. :) Also for the
highlighting. However I decided to go with the official API docs for the
highlighting, since this is what the developer is supposed to use. I
don't think, that highlighting or completion of internal functions is a
good idea.

I implemented the paren rainbow and made it optional via
clj_paren_rainbow. I had to implement lispindent from scratch. For some
reason it got confused. So the indent might be broken again. :/ I really
need a test case with all special cases.

Next release candidate (v1.2.1) available for Vim users to check out.
http://kotka.de/projects/clojure/vimclojure.html

Sincerely
Meikel


Reply all
Reply to author
Forward
0 new messages