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 [dire­ctory]
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

:Bun­dle­Ins­tall installs plugins
Bundle 'gitus­er/­git­rep­o' 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
:DBE­xec­SQL Execute SQL Query on db (defined by config­/da­tab­ase.yml and enviro­nment)
:X,Y­Rex­tract filename Extracts piece of Rails code to partial
:Rlog Opens Rails log
:help rails-­int­egr­ation
 

dbext

:Rdbext {envir­onm­ent}
:Select * from users

Pry

edit Atten­dee­#to_s
           

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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