Script Roundup: textobj-word-column.vim, refactor-rails.vim

Alex R. Young
usevim
Published in
1 min readAug 22, 2012

Send in your Vim scripts for review through our contact form or @vimnews.

textobj-word-column.vim

textobj-word-column.vim by Jim Garvin adds extra text-objects:

  • ac: A column
  • ic: Inner column
  • aC: A COLUMN, based on aW
  • iC: Inner COLUMN, based on iW

These text-objects can be combined with other commands. For example, vic will visually select a column. The author has made an animated gif that demonstrates the plugin with some Ruby code.

refactor-rails.vim

refactor-rails.vim (GitHub: sandeepravi / refactor-rails.vim, License: Vim) by Sandeep Ravichandran is designed to help refactor Rails projects, and includes commands like these:

  • riv: Select an instance variable in Visual mode, then use this to rename it
  • em: Extract selected code into a new method
  • rc: Rename a controller, including all associated helpers and test cases

--

--