dotar/vim/settings/outerblock.vim

14 lines
386 B
VimL
Raw Normal View History

2012-10-02 08:16:15 +08:00
" Navigate to the block surrounding this one
" For example if you're inside
" foo do
" bar do
" # you are here
" end
" end
"
" Then hitting ,orb ("outer ruby block") will take you to 'foo do'
"
" This is relying on the textobj-rubyblock which gives us 'ar' around ruby
" and matchit.vim which gives us jumping to the matching
nnoremap <silent> ,orb :normal varar%<esc><esc>