Ⅰ. 插件描述
Allow a read eval print loop and vim to play nicely togetherⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/replvim-sh'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/replvim-sh'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/replvim-sh'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/replvim.sh
Ⅳ. 文档说明
UNIX command-line only
Usage : replvim.sh [options] replname code_type file
Runs a screen/vim session on the given file so that one window
holds a repl and another window holds vim.
Hit:
<leader>e to eval the current expression
<leader>r to evaluate the given marked range
<leader>f to evaluate the whole file
ctrl-a <TAB> to switch windows to the repl
ctrl-a to exit everything
Set the leader in vim with
:let mapleader = ","
replacing "," with the key you like the most
Arguments (wrap these in an alias or sh script):
replname The repl being used (ocaml, bigloo, chicken have been tested)
code_type Can be 'lisp' for lisp-like or 'ocaml'
file The file for vim to edit
Options:
--lines n Use n lines of screen space for the repl
--nopipe Use files instead of pipes. This can be used when vim 6.3
gives FSYNC errors when writing to pipes on some OSes.
--echo Echo the commands being sent to the repl and allow access
to them in the readline history
Requires (on your PATH):
socat (http://www.dest-unreach.org/socat/)
screen (http://www.gnu.org/software/screen/)
if you don't have these your life will be much richer for obtaining them
(at saul (dot alien-science org)) welcomes your fixes and extensions