Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'justinmk/nvim-repl'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'justinmk/nvim-repl'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'justinmk/nvim-repl'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/justinmk/nvim-repl
Ⅳ. 文档说明
# nvim-repl
This is a fork of vimcmdline
and https://gitlab.com/HiPhish/repl.nvim
It's not usable yet.
The plan is to create a simplified/minimal REPL plugin using ideas/code from the two.
Usage
:Replto start the REPL.yx{motion}to send text object to the REPL.yxxto send the current line to the REPL.{Visual}<Enter>to send the selection to the REPL.!qto quit the REPL.
Configuration
nmap <Plug>(repl_start) ?
nmap <Plug>(repl_send) ?
nmap <Plug>(repl_quit) ?
let cmdline_vsplit = 1 " Split the window vertically
let cmdline_term_height = 15 " Initial height of REPL window or pane
let cmdline_term_width = 80 " Initial width of REPL window or paneYou can define what application will be run as REPL for each supported file
- Create a dictionary
g:replwithfiletype:{dict}key-value pairs.
let g:repl {
\ 'python': { 'bin': 'ptipython3' },
\ 'ruby': { 'bin': 'pry' },
\ 'sh': { 'bin': 'bash' }
\ }