APIdock + emacs integration
Posted on Febrero 20th, 2009 por gaizka
Inspired by the post APIdock + vim integration, and feeling jealous for a second, i’ve thought: “Hey, this can be easily done with emacs!!”
So, here you have APIdoc + emacs integration.
Just copy it to somewhere in your emacs path (i.e., ~/.emacs.d), and add this
line to your ~/.emacs:
(eval-after-load 'ruby-mode '(require 'rails-apidock))
Complete script:
;; Simple function to search in Apidoc rails API ;; To use it, copy this file to somewhere in your emacs path ;; (i.e., ~/.emacs.d), and add this line to your ~/.emacs ;; ;; ;; (eval-after-load 'ruby-mode '(require 'rails-apidock)) ;; ;; ;; Then put your cursor in the word/symbol you want to look for, and ;; press C-c d ;; ;; (defun gaizka-search-apidock-rails () "Search current word in apidock for rails" (interactive) (let* ((word-at-point (thing-at-point 'symbol)) (word (read-string "Search apidock for? " word-at-point))) (browse-url (concat "http://apidock.com/rails/" word)))) (define-key ruby-mode-map (kbd "C-c d") 'gaizka-search-apidock-rails) (provide 'rails-apidock)
[...] There’re now emacs bindings available as [...]