How can we delete this if / end pair and everything inside it?
def foo
if bar
# blah
# blah
# blah
# blah
end
end
d% will do it.
d - delete% - until the matching endAs you might guess, :h % will tell you more.
Note: this behavior requires that you enable vim's built-in matching plugin like so: runtime macros/matchit.vim.