Vous êtes sur la page 1sur 2

12/4/2016

GitHub - mileszs/apidock.vim: Vim plugin that searches http://apidock.com Ruby, Rails, and RSpec docs from within Vim.

Personal Open source Business Explore

Pricing Blog Support

mileszs / apidock.vim
Code

Issues 0

Watch 2

Pull requests 1

Projects 0

Pulse

Sign in

This repository Search

Sign up

Star 33

Fork 8

Graphs

Vim plugin that searches http://apidock.com Ruby, Rails, and RSpec docs from within Vim.
17 commits
Branch: master

1 branch

0 releases

New pull request

mileszs Revert "Removed '&' at the end of command, because doesn't work in Ma

doc
plugin
README.md
Rakefile

1 contributor
Find file

Clone or download

Latest commit e200bc9 on Mar 24, 2009

Added information about using it on OSX


Revert "Removed '&' at the end of command, because doesn't work in Ma
I lack proofreading skills.
Added Rakefile w/ install task

8 years ago
8 years ago
8 years ago
8 years ago

README.md

apidock.vim
This plugin allows you to browse APIdock's Ruby, Rails, and RSpec docs from within Vim. It will invoke Firefox from the
command line, and open the query in a new tab.
The plugin uses the command 'firefox', which it expects to be in your path, and executable from your shell. See
'Customization' below if you need some other behavior. (In particular, all of you OSX users will have to make a small
change.) This should work out of the box on Ubuntu, and most other Linuxbased systems on which Firefox is
installed.
The Official Version of ack.vim is available at vim.org.

Installation

If you have Rake installed, you can just run: rake install.
The file apidock.vim goes in ~/.vim/plugin, and the apidock.txt file belongs in ~/.vim/doc. Be sure to run
:helptags ~/.vim/doc

afterwards.

Usage

RR Search the Rails docs for the word under the cursor.
RB Search the Ruby docs for the word under the cursor.
RS Search the RSpec docs for the word under the cursor.
https://github.com/mileszs/apidock.vim

1/2

12/4/2016

GitHub - mileszs/apidock.vim: Vim plugin that searches http://apidock.com Ruby, Rails, and RSpec docs from within Vim.

Origin Story

This Vim plugin is mostly copied from the AkitaOnRails guys' vimfiles on GitHub. In particular, this commit by Cassio
Marques on January 10th, 2009. I just added the RSpec function, the help docs, and then threw it up on GitHub.
However, do bug me if something isn't working.

Customization

If you don't want to use Firefox, the fix is pretty simple. Edit ~/.vim/plugin/apidock.vim, and edit the line (should be
line #1),
let g:browser = 'firefox -new-tab '

using the shell command for your preferred browser.


In OSX, you'll want to change the previously mentioned line to
let g:browser = 'open -a /Applications/Firefox.app'

You may also need to remove the three ampersands in the file. Davey did, anyway, as it wouldn't work with them. I
have no idea why. Perhaps the 'open' command has problems with running asynchronously. Maybe the ampersand
insulted its mother. Simply deleting the ampersand character will do, but you are welcome to remove everything after
(and including) the final period from each line with an ampersand, if you'd like.

2016 GitHub, Inc. Terms Privacy Security Status Help

https://github.com/mileszs/apidock.vim

Contact GitHub API Training Shop Blog About

2/2

Vous aimerez peut-être aussi