Is there currently a plugin that you ruby on rails developers that are also using macvim/gvim/vim that allows you to take a quick block of code and create a partial from it? I know that TextMate does this, figured someone has ported it by now to vim also.
Share
You want Tim Pope’s rails.vim plugin:
http://rails.vim.tpope.net/
It provides an
:Rextractcommand that pulls a range of lines into a partial. Here’s a very short demo of it in action:http://rails.vim.tpope.net/images/rpartial.gif
(The
:Rpartialcommand in the demo is an alias for:Rextract.)The plugin provides dozens of other features, too, and many people consider it a must-have for Rails development in Vim.