pry


Ⅰ. 插件描述

Pry/Vim Integration

Ⅱ. 基本信息

创建日期:  2013-02-19
使用用户:  3
Github星:  4
插件作者:  Ryan King

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/pry'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/pry'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/pry'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/pry

Ⅳ. 文档说明

For the high-falutin' concept, see: https://github.com/pry/pry/wiki/pry-de

iabbr bpry => require 'pry'; binding.pry # Very important for quickly dropping into pry

<leader>bp and <leader><leader>p # same as bpry but from Normal Mode

<f3> = kill-pry-rescue # see https://github.com/ConradIrwin/pry-rescue - this breaks you out of the auto-rescue'd pry

<leader>ph = Grab the last line (or lines if given a numerical arg) from ~/.pry_history - can be very handy, because you can perfect your code in the live coding environment of the Pry REPL, then slurp that into your editor.

Note that there are ways to integrate back into the REPL from the editor. vslime and vimux do this, as long as you're in tmux. However, I currently just do "!tmux send -t1" in a manual :map from vim. This script might eventually include something like this. Please let me know if you already know what you want.

添加新评论