Show Menu
Cheatography

vim rails dev Cheat Sheet by

commands for developing rails in vim

ctags inside vim

ctrl+] jump to definition
ctrl+t jump back

ag.vim

:Ag search [direc­tory]
e to open file and close the quickfix window
o to open (same as enter)
t to open in new tab
h to open in horizontal split
q to close the quickfix window
 

Vundle

:Bundl­eIn­stall installs plugins
Bundle 'gitus­er/­git­repo' to add new plugin in .vimrc

rails.vim

gf jump to defining code for functi­on/­class under cursor
:R Open Related File
:RS Open Related File in Split view
:DBExecSQL Execute SQL Query on db (defined by config­/da­tab­ase.yml and enviro­nment)
:X,YRe­xtract filename Extracts piece of Rails code to partial
:Rlog Opens Rails log
:help rails-­int­egr­ation
 

dbext

:Rdbext {envir­onment}
:Select * from users

Pry

edit Attend­ee#to_s
           
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          VI Editor Cheat Sheet
          Vim NERDTree Cheat Sheet
          vim-rails Cheat Sheet