gem-browse


Ⅰ. 插件描述

gem edit, gem open, gem clone, gem browse

Ⅱ. 基本信息

创建日期:  2011-08-28
使用用户:  2
Github星:  195
插件作者:  Tim Pope

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

gem-browse

Open a library file you can require in your editor. That's it.

gem edit active_support/all
gem edit rake/task thor/task
gem edit -e mvim fileutils

Actually that's not it. You can also open a gem by name.

gem open bundler

Your editor's current working directory will be the root of the gem.

I almost forgot. You can also clone a gem from GitHub.

gem clone rails
gem clone -d ~/src capybara

And you can tell it to open the gem in your editor afterwards.

gem clone -o rack
gem clone -oe mvim -d /tmp gem-browse

This one doesn't work if the neither the homepage nor the source code
URL point back at GitHub.

That's really it. I mean other than the command that lets you open a
gem's homepage in your browser. You know, the command this gem is named
after.

gem browse sprockets

Installation

RubyGems 1.8 is required to use gem edit, but the other commands will
work on any version that supports RubyGems plugins.

gem install gem-browse

If you're using RVM, you can put it in the global gemset (relax, it has
no dependencies):

echo gem-browse >> ~/.rvm/gemsets/global.gems
rvm @global do gem install gem-browse

Protip: Install gem-ctags to
automatically invoke Ctags on gems as
they are installed.

Contributing

Don't submit a pull request with [an ugly commit
message](http://stopwritingramblingcommitmessages.com) or I will ignore
your patch until I have the energy to politely explain my zero tolerance
policy.

License

Copyright (c) Tim Pope. MIT License.

添加新评论