Quickstart
- Download Vimclojure from http://www.vim.org/scripts/script.php?script_id=2501
- Unzip the zip file into ~/.vim (Unix) resp. vimfiles (Windows).
- Ensure that the following is in your .vimrc resp. _vimrc:
set nocompatible filetype plugin indent on syntax on
- Edit a Clojure file.
Disclaimer
If you don't know Vim, Vimclojure might be not the right tool for you. Vim's learning curve can be as steep as Emacs, Eclipse + CCW, Netbeans + Enclojure, or Textmate (on OS X) are probably more suitable in this case.
Labels:
6 Comments
Hide/Show CommentsFeb 01, 2012
Sanel Zukan
Clojure and Vim can be used with Conque. I'm not able to update above page, so here is quick start.
The easiest way is to download Vimball from (http://code.google.com/p/conque/downloads/list), and unpack it with:
(commands starting with ':' are meant to be executed as ex commands). After this step, vim will unpack archive and install things at appropriate places.
To start repl, start vim and execute in as ex command:
:ConqueTerm <path-to-lein>/lein
or
:ConqueTerm bash (then manualy run clojure jar)
To evaluate your code, select region and press F9; conque will send it to running buffer and execute command.
Feb 12, 2012
Łukasz Korecki
I recommend using Screen.vim (it also works with Tmux).
It gives the ability to open a shell prompt or any repl in a Screen/Tmux window (or pane) and send messages to it via commands, which can be bound to convenient shortcuts:
Feb 29, 2012
Sanel Zukan
True. However, if you are using Screen.vim with GNU Screen, you are limited to 256 bytes transferred between screen buffers. Hoping tmux removes this limit.
Feb 19, 2012
Sam Garrett
Łukasz Korecki: Using Screen.vim seems to be very similar to vim-slime, what I use. You can grab some text with it and send it to a screen/REPL session using C-c, C-c. So far it's been a pretty simple setup with VimClojure and vim-slime for me.
Feb 29, 2012
Sanel Zukan
Also, for Vim users who are not afraid to try Emacs but are not eager to learn Emacs shortcuts, Evil mode implements major Vim's commands and shortcuts in all buffers. Requires some time to get used to Emacs philosophy, especially if you are die hard Vi/Vim user.
Mar 28, 2012
Stefan Matting
There is also Slimv by Tamas Kovacs. "Slimv is a SWANK client for Vim, similarly to SLIME for Emacs."
It has a lot of functionality, more than most of the screen-based approaches, but its syntax and indenting is not quite as nice as vimclojure's.
Also it comes with an (optional) paredit mode!
Setup
Use it with leiningen
Hit ,c (that is comma followed by a "c") to start a REPL via "lein repl"
Common keybindings - see :help slimv for full list
Useful configurations in .vimrc