Lucky
Lucky

Reputation: 713

how to use '%' keystroke in vim command mode for languages like Ruby

With Vim, pressing the '%' key on a curly brace (in command mode) moves the cursor to the corresponding opening/closing curly brace. It is quite helpful for c files and the like. How do I get this functionality for a language like Ruby, where code blocks are delineated by do/end or whatnot?

Upvotes: 1

Views: 69

Answers (1)

Philip Hallstrom
Philip Hallstrom

Reputation: 19899

Pretty sure it's available as part of https://github.com/vim-ruby/vim-ruby

You may also find https://github.com/tpope/vim-endwise useful.

Upvotes: 0

Related Questions