Ⅰ. 插件描述
A Clojure IDE for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'kotarak/vimpire'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'kotarak/vimpire'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'kotarak/vimpire'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/kotarak/vimpire
Ⅳ. 文档说明
# Vimpire – a Clojure environment for Vim
Vimpire is the undead body of VimClojure which returned into the
Clojuresphere.
_..._
.' '.
; __ __ ;
|/ \ / \|
|\| -- ' -- |/|
|(| \o| |o/ |)|
_\| > |/_
.-' | ,.___., | '-.
\ ; V'-'V ; /
`\ \ / /`
`\ '-...-' /`
`\ / \ /`
jgs `\\_//`Vimpire is not intended to be an easy to use Clojure IDE, but a plugin
to make life easier for people already familiar with Vim. So you should
be familiar with Vim and/or Java. Eg. Vimpire won't help you in any way
to set up a correct classpath! This is the responsibility of the build
system of the given project. So before using the dynamic server make
yourself comfortable with Clojure, the JVM and Vim.
Requirements
The plugin is ready to be used as a package. Regarding package managers
you'll have to figure things out yourself.
It uses channels, so you'll need a Vim 8 or later.
On the Clojure side, you have to provide a socket repl. That means
either Clojure 1.8 or you'll have to backport the functionality yourself.
Here be Dragons
After starting Vim and ideally before editing Clojure code you have to
start the backend server connection.
:VimpireBite <host>:<port>
No further setup is required. The backend part of Vimpire is completely
zero config and self contained. Also, there is no conflict of several
Vimpire instances connecting to the same backend server. They share code
in case of being of the same version. Otherwise they are completely
separated.
When you got fangs, the connection is ready. Be aware that the first
connect is slow, because things have to be prepared like starting the
side-loader and injecting the venom. Don't bother me with trivial
nonsense like “start-up time.”
Demos
I created a small set of short demos:
- Stalking the prey
- Dynamic highlighting
- Documentation lookup
- Goto and show source
- Eval operators
- Macro expansion
- Async completion
- The repl
FAQs
- Hey, I'd like nifty feature X to be supported!
Have fun implementing it. I'll support in providing extension points to
reuse Vimpire's infrastructure, but I don't care about including it in
Vimpire itself.
- Hey, why are there no default bindings set up?
Obviously the opinions are too different on this one. So pick your own
style.
- Hey, why is my repl messed up when I delete the prompt?
Because it's a buffer and not a terminal. - Hey, why is the namespace loaded when I open a file? I got toplevel commands!
Don't have toplevel commands. Put them in a(defn main …)and use
clj -m to run the script. Starting the rockets on the toplevel is bad
- There are exceptions. I don't optimise for exceptions.
- Hey, your plugin sucks because X!
Then don't use it.
Sources
The ASCII art was taken from here.
Take care. It tries to play a midi.
--
Meikel Branmdeyer <mb@kotka.de>
Erlensee, 2018