Ⅰ. 插件描述
Vim Bundle for using a plugin-based persistent Java BackendⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'robertbraeutigam/vim-java-backend'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'robertbraeutigam/vim-java-backend'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'robertbraeutigam/vim-java-backend'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/robertbraeutigam/vim-java-backend
Ⅳ. 文档说明
Vim Java Backend
A Vim Plugin that enables the usage of a persistently running Java program that can
be extended through a very simple and easy-to-use Plugin system.
The Java Engine used is at: https://github.com/robertbraeutigam/vim-java-backend-engine
Install
If you are using Pathogen, just clone this into the 'bundle' directory.
Usage
This plugin defines two commands:
JavaBackendExec(<command>, <parameters>): Runs the specified command on the Java backend if available with the specified parameters.JavaBackendExit(): Make the backend exit.
If the backend is not running, calling JavaBackendExec() with any command will start the Backend and run the specified command. The command
parameter needs to be a fully qualified classname with a method, for example: tld.company.SomeCommand.getResult. The specified
class has to be registered as a command in the backend engine (see documentation of backend engine how to register a command).
The parameters is any array of tuples. In the tuples the parameter name and value need to be defined, for example:
[ ['id', '123'], ['type', 'Something'] ]. The parameters need to match the signature of the called method.
Placement of Plugins
The loading of plugins is compatible the popular bundle management plugin Pathogen. The backend will search for Plugins (jar files with the necessary METAINF entries) in all bundles, under the directory java-plugin. This directory may also contain additional (non-plugin) jar files as dependencies.
Warning
This plugin will establish communication between the backend engine and vim through a non-secure local port (open only to localhost, not accessible remotely). Currently this is done with a single user in mind. Plugin may not work on multi-user systems, may leak data between users, may be open to denial-of-service or script-injection attacks.
Use at own risk.