" Fix omnifunc
if g:pymode && g:pymode_rope && g:pymode_rope_vim_completion
setlocal omnifunc=RopeOmni
endif
" Motion {{{
if !pymode#Default('g:pymode_motion', 1) || g:pymode_motion
nnoremap ]] :call pymode#motion#move('^\(class\\|def\)\s', '')
nnoremap [[ :call pymode#motion#move('^\(class\\|def\)\s', 'b')
nnoremap ]C :call pymode#motion#move('^\(class\\|def\)\s', '')
nnoremap [C :call pymode#motion#move('^\(class\\|def\)\s', 'b')
nnoremap ]M :call pymode#motion#move('^\s*def\s', '')
nnoremap [M :call pymode#motion#move('^\s*def\s', 'b')
onoremap ]] :call pymode#motion#move('^\(class\\|def\)\s', '')
onoremap [[ :call pymode#motion#move('^\(class\\|def\)\s', 'b')
onoremap ]C :call pymode#motion#move('^\(class\\|def\)\s', '')
onoremap [C :call pymode#motion#move('^\(class\\|def\)\s', 'b')
onoremap ]M :call pymode#motion#move('^\s*def\s', '')
onoremap [M :call pymode#motion#move('^\s*def\s', 'b')
vnoremap ]] :call pymode#motion#vmove('^\(class\\|def\)\s', '')
vnoremap [[ :call pymode#motion#vmove('^\(class\\|def\)\s', 'b')
vnoremap ]M :call pymode#motion#vmove('^\s*def\s', '')
vnoremap [M :call pymode#motion#vmove('^\s*def\s', 'b')
onoremap C :call pymode#motion#select('^\s*class\s', 0)
onoremap aC :call pymode#motion#select('^\s*class\s', 0)
onoremap iC :call pymode#motion#select('^\s*class\s', 1)
vnoremap aC :call pymode#motion#select('^\s*class\s', 0)
vnoremap iC :call pymode#motion#select('^\s*class\s', 1)
onoremap M :call pymode#motion#select('^\s*def\s', 0)
onoremap aM :call pymode#motion#select('^\s*def\s', 0)
onoremap iM :call pymode#motion#select('^\s*def\s', 1)
vnoremap aM :call pymode#motion#select('^\s*def\s', 0)
vnoremap iM :call pymode#motion#select('^\s*def\s', 1)
endif
" }}}