nvim-repl


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2015-04-10
使用用户:  1
Github星:  13
插件作者:  Justin M. Keyes

Ⅲ. 安装方法

使用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

  • :Repl to start the REPL.
  • yx{motion} to send text object to the REPL.
  • yxx to send the current line to the REPL.
  • {Visual}<Enter> to send the selection to the REPL.
  • !q to 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 pane

You can define what application will be run as REPL for each supported file

  1. Create a dictionary g:repl with filetype:{dict} key-value pairs.
let g:repl {
  \ 'python': { 'bin': 'ptipython3' },
  \ 'ruby': { 'bin': 'pry' },
  \ 'sh': { 'bin': 'bash' }
  \ }

Related

添加新评论