Today I Learned

hashrocket A Hashrocket project

Ruby Text Objects

Today I discovered the amazing Ruby text objects feature of the plugin Vim-ruby.

Vim-ruby give us these four objects:

  • am ('a method')
  • im ('inner method')
  • aM ('a class')
  • iM ('inner class')

These can be composed with d, c, and v to build great editing tools like cim (change inner method) or vaM (select a class).

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.