Académique Documents
Professionnel Documents
Culture Documents
GitHub - mileszs/apidock.vim: Vim plugin that searches http://apidock.com Ruby, Rails, and RSpec docs from within Vim.
mileszs / apidock.vim
Code
Issues 0
Watch 2
Pull requests 1
Projects 0
Pulse
Sign in
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
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
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 '
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.
https://github.com/mileszs/apidock.vim
2/2