Is there native functionality in Vim that allows one to move the cursor to the beginning/end of the next method? I already know about [[, ]],
I spent hours to make this pattern: /^\s*\(\i\+\_[ \t\*]\+\)\+\i\+\_s*(\_[^)]*)\_s*{, it works good for me.
EDIT: a better pattern(version 2): /\(\(if\|for\|while\|switch\|catch\)\_s*\)\@64
see the effect here:
you can map some convenient bindings in your .vimrc, such as:
" jump to the previous function
nnoremap [f :call search('^\s*\(\i\+\_[ \t\*]\+\)\+\i\+\_s*(\_[^)]*)\_s*{', "bw")
" jump to the next function
nnoremap ]f :call search('^\s*\(\i\+\_[ \t\*]\+\)\+\i\+\_s*(\_[^)]*)\_s*{', "w")
EDIT: a better pattern(version 2):
" jump to the previous function
nnoremap [f :call
\ search('\(\(if\\|for\\|while\\|switch\\|catch\)\_s*\)\@64
" jump to the next function
nnoremap ]f :call
\ search('\(\(if\\|for\\|while\\|switch\\|catch\)\_s*\)\@64