vim rails dev Cheat Sheet

A Software › Vim cheat sheet in English by firemind

commands for developing rails in vim

11,391 views 2,698 downloads 3 Sep 2014 History
3.7 avg · 0 ratings

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 '­git­use­r/g­itr­epo­' 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

Badges

Good Cheat Sheet Nice Cheat Sheet

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.