Today I Learned

hashrocket A Hashrocket project

Jump to cucumber step definitions in VIM

There is an amazing vim plugin vim-cucumber that allows you to jump from step (.feature file) to its definition (_steps.rb file).

In vim normal mode put the cursor on any step inside a .feature file and:

  • [d or ]d => split pane
  • <CTRL-w><CTRL-d> => split pane and change cursor focus
  • [<CTRL-d> or ]<CTRL-d> => replace pane

h/t @mrmicahcooper

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.