6

Both addons have good sides, SLIMV has better REPL(faster than vimclojure REPL), but vimclojure's indentation and syntax coloring is better(also, vimclojure's syntax coloring is working in REPL too). And vimclojure's indentation is better. For example, this is SLIMV indentation for a function:

(defn func
      [])

And this is vimclojure's:

(defn func
   [])

I'm trying to use both plugins, with good sides of each one. I need syntax coloring in SLIMV REPL, and vimclojure indentation. Do you have any ideas how can I do that?

Tamas Kovacs
  • 1,495
  • 7
  • 9
sinan
  • 6,809
  • 6
  • 38
  • 67

1 Answers1

7
  • You can replace the Slimv indent plugin in vimfiles/indent with whatever you want (so I guess with Vimclojure's indent plugin as well).
  • You can also replace the syntax plugin in Slimv in vimfiles/syntax (actually there's no special syntax plugin, it uses Vim's built-in lisp.vim).
  • You can enable syntax coloring in the Slimv REPL buffer with this command in your .vimrc: let g:slimv_repl_syntax = 1
  • ... and I'll fix the indentation problem you mentioned in Slimv :)
Tamas Kovacs
  • 1,495
  • 7
  • 9
  • Thanks for you response. I tried to change SLIMV's indent and syntax files with vimclojure's but vimclojure's indent and syntax scripts use lots of vimclojure functions, so they don't work outside vimclojure. – sinan Jul 01 '11 at 09:37
  • OK, then I'll try to improve indentation and syntax coloring in Slimv. I have already fixed the defn indentation and also added highlighting of frequent Clojure keywords. Please fetch the latest Slimv development version from the repository: https://bitbucket.org/kovisoft/slimv . Bug reports are welcome :) – Tamas Kovacs Jul 01 '11 at 11:05
  • 1
    @bs0d1 You just need the autoload/vimclojure.vim file. Then the syntax and indent plugins will work. Be sure to not set the `g:vimclojure#DynamicHighlighting` option since it requires the backend. Deactivating it does not affect the general highlighting of the clojure code. – kotarak Jul 01 '11 at 11:26
  • @tamas-kovacs If you want I can refactor the backend independent parts into their own files. Then you can just re-use vimclojures syntax and indentation plugins. I don't see the use of re-inventing the wheel again, when we can throw efforts together. – kotarak Jul 01 '11 at 11:28
  • @kotarak, great, I'm testing it in a minute. @Tamas, I don't like changes in last version of slimv(changes in swank.py), they really slowed my REPL, moving between REPL buffer and others and evaluating exprs from REPL are slowed down. I'm using the old version(which works great for me, I don't know why you added timeouts. – sinan Jul 01 '11 at 11:38
  • @kotarak Thanks, sounds like a good idea, but I'm afraid it's not that simple because Slimv uses the `:indentation-update` info received from the swank server for indenting user defined functions (with &body argument), and it would be lost by the replacement. So the best solution would be some kind of merging. I'll study Vimclojure's indentation code, so that I can decide how to proceed. – Tamas Kovacs Jul 01 '11 at 12:25
  • @Tamas, sorry I couldn't find bitbucket project's bug report page. When I edit a lein project and then run REPL, I can't use source, find-doc and some other commands without this commmands: https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L258 but if I run REPL in a terminal(in same folder with vim) with just `lein repl`, I can use this special commands(or functions, macros, etc) – sinan Jul 01 '11 at 12:34
  • @bs0d1 There is no bug report page yet, please send all bug reports directly to me (kovisoft at gmail dot com). I'd like to ask you to contact me with a more detailed description on the slowdown: what do you exactly do, how it was in the previous (which one?) version and how it is now. There was already a 0.01 timeout of waiting for swank response, it is now increased to max. 0.1 sec, this should not be such a big delay, so I guess there is something else you experience. Please send me a mail, so that we can investigate it. Thanks! – Tamas Kovacs Jul 01 '11 at 13:12