Show Menu

vim rails dev Cheat Sheet by

commands for developing rails in vim

ctags inside vim

ctrl+] jump to definition
ctrl+t jump back


: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


:Bun­dle­Ins­tall installs plugins
Bundle 'gitus­er/­git­rep­o' to add new plugin in .vimrc


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


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


edit Atten­dee­#to_s


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