Ⅰ. 插件描述
Rappel is fairly minimal Read Execute Print Loop (REPL) plugin for NeoVimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'cypher1/nvim-rappel'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'cypher1/nvim-rappel'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'cypher1/nvim-rappel'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/cypher1/nvim-rappel
Ⅳ. 文档说明
# Rappel
REPLs for NeoVim
Use <leader>r to open the current file in a REPL
or <leader>R to open the current file in a REPL
Use <leader>l to open the current file with the OS
Currently supports:
- c
- cpp
- haskell
- javascript
- lisp
- perl
- prolog
- python
- ruby
- rust
- sh
- swift
- zsh
Settings
To set keybindings:
let g:rappel#repl_key = '<leader>p'
let g:rappel#run_key = '<leader>P'
let g:rappel#launch_key = '<leader>l'To change what the bindings do:
let g:rappel#term = 'vsp | term '
let g:rappel#launch = 'chrome %'
let g:rappel#default = g:rappel#term
To set up REPLs of your own (% expands to the current file):
let g:rappel#custom_repls={
\ 'cpp': {
\ 'compiler': 'g++ -Wall -Werror -O2 %',
\ 'run': './a.out',
\ },
\ 'markdown': {
\ 'launch': 'marked % > %.html; chrome %.html'
\}Adds the following commands
:RappelRepl " Opens a Repl in a split
:RappelRun " Runs the program a split
:RappelLaunch " Opens the file with the default program