Embedded Ruby (.erb) Snipmate Shortcuts

Snipmate is an awesome Vim plugin that gives programmers access to some of the shorcuts they have grown to love on other text editors like Sublime Text and Textmate.  Most critically, when in insert mode in a .erb file, = followed by tab expands to <%=  %>.  Control + S + ‘ and Control + S + } expand to ” and {}, but the buttons must be pressed simultaneously and I find these shortcuts to be more hassle than they are worth (it is hard to press all three buttons at the same time).

Virtually all of the html tags can be expaned as well by typing the starting tag (with no <>) and pressing tab.  For example html + tab, p + tab, a + tab all expand with a useful shortcut.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s