Ruby Snippets


Ⅰ. 插件描述

Some abbreviations to use with Ruby

Ⅱ. 基本信息

创建日期:  2007-07-23
使用用户:  5
Github星:  2
插件作者:  Eustaquio Rangel de Oliveira Jr.

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

This script have some abbreviations to use in insert mode while writing Ruby code. The goal is to speed up (more!) code writing.
There are "triggers" when typing def, for, begin, inject, class, module, collect, detect, each, find, find_all, map, reject, select, attr_reader, attr_writer, attr_accessor. For example, when typing "class" you get

class ClassName
end

and the cursor is positioned on "ClassName", where you can use cw to replace it to the name you want on the class.

There's a little video on http://eustaquiorangel.com/blog/show/438 about the script. Non-portuguese readers, please just click on play.

添加新评论