Skip to content

Instantly share code, notes, and snippets.

@amcsi
Created April 9, 2014 16:09
Show Gist options
  • Save amcsi/10287309 to your computer and use it in GitHub Desktop.
Save amcsi/10287309 to your computer and use it in GitHub Desktop.
vim-submode next/prev method
" ]m -> mmmm (next method) MMMM (prev method)
call submode#enter_with('nextMethod', 'n', '', ']m', ']m')
call submode#leave_with('nextMethod', 'n', '', '<Esc>')
call submode#map('nextMethod', 'n', '', 'm', ']m')
call submode#map('nextMethod', 'n', '', 'M', '[m')
" [m -> mmmm (prev method) MMMM (next method)
call submode#enter_with('prevMethod', 'n', '', '[m', ']m')
call submode#leave_with('prevMethod', 'n', '', '<Esc>')
call submode#map('prevMethod', 'n', '', 'm', '[m')
call submode#map('prevMethod', 'n', '', 'M', ']m')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment