牌語備忘録 -pygo

あくまでもメモです。なるべくオフィシャルの情報を参照してください。

牌語備忘録 -pygo

『Rinari』を使ってみる -- EmacsでRails環境


Installing "Emacs Starter Kit"

install
git clone https://github.com/technomancy/emacs-starter-kit.git

Basic Setup -- Installing "rinai"

install
git clone git://github.com/eschulte/rinari.git
cd rinari
git submodule init
git submodule update
init file
;; Rinari
(add-to-list 'load-path "~/PATH/TO/YOUR/ELISP/rinari")
(require 'rinari)

Rhtml Setup

init file
;;; rhtml-mode
(add-to-list 'load-path "~/PATH/TO/YOUR/ELISP/rhtml")
(require 'rhtml-mode)
(add-hook 'rhtml-mode-hook
    (lambda ()
      (rinari-launch)
      (abbrev-mode nil) 
      ))

Optional Setup:

If you use "ido-mode"

init file
;; Interactively Do Things
(require 'ido)
(ido-mode t)

Navigation

C-c ; f c    rinari-find-controller
C-c ; f e    rinari-find-environment
C-c ; f f    rinari-find-file-in-project
C-c ; f h    rinari-find-helper
C-c ; f i    rinari-find-migration
C-c ; f j    rinari-find-javascript
C-c ; f l    rinari-find-plugin
C-c ; f m    rinari-find-model
C-c ; f n    rinari-find-configuration
C-c ; f o    rinari-find-log
C-c ; f p    rinari-find-public
C-c ; f s    rinari-find-script
C-c ; f t    rinari-find-test
C-c ; f v    rinari-find-view
C-c ; f w    rinari-find-worker
C-c ; f x    rinari-find-fixture
C-c ; f y    rinari-find-stylesheet

command

C-c ; s    rinari-script              
C-c ; e    rinari-insert-erb-skeleton 
C-c ; r    rinari-rake                
C-c ; w    rinari-web-server          
C-c ; x    rinari-extract-partial     
C-c ; ;    rinari-find-by-context     
C-c ; d    rinari-cap
C-c ; q    rinari-sql
C-c ; t    rinari-test
C-c ; c    rinari-console
C-c ; g    rinari-rgrep
C-c ; p    rinari-goto-partial
C-c ; '    rinari-find-by-context

Check

動作確認

M-x rinari-<tab>

hoge_controller.rb などから

C-c ; f m

Emacsでコマンドいれると app/models/hoge.rb ファイルが開く。

その他

CoffeeScript
;; https://github.com/defunkt/coffee-mode
(require 'coffee-mode)
(add-to-list 'auto-mode-alist
             '("\\.coffee$" . rinari-minor-mode)
             '("\\.coffee$" . coffee-mode)
             )