Skip to content

Commit 5699ca8

Browse files
committed
Fix motions to support async def
1 parent 95fdf8f commit 5699ca8

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

after/ftplugin/python.vim

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,36 @@ if g:pymode_motion
1111
finish
1212
endif
1313

14-
nnoremap <buffer> ]] :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', '')<CR>
15-
nnoremap <buffer> [[ :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', 'b')<CR>
16-
nnoremap <buffer> ]C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', '')<CR>
17-
nnoremap <buffer> [C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', 'b')<CR>
18-
nnoremap <buffer> ]M :<C-U>call pymode#motion#move('^<Bslash>s*def<Bslash>s', '')<CR>
19-
nnoremap <buffer> [M :<C-U>call pymode#motion#move('^<Bslash>s*def<Bslash>s', 'b')<CR>
20-
21-
onoremap <buffer> ]] :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', '')<CR>
22-
onoremap <buffer> [[ :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', 'b')<CR>
23-
onoremap <buffer> ]C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', '')<CR>
24-
onoremap <buffer> [C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>def)<Bslash>s', 'b')<CR>
25-
onoremap <buffer> ]M :<C-U>call pymode#motion#move('^<Bslash>s*def<Bslash>s', '')<CR>
26-
onoremap <buffer> [M :<C-U>call pymode#motion#move('^<Bslash>s*def<Bslash>s', 'b')<CR>
27-
28-
vnoremap <buffer> ]] :call pymode#motion#vmove('<Bslash>v^(class<bar>def)<Bslash>s', '')<CR>
29-
vnoremap <buffer> [[ :call pymode#motion#vmove('<Bslash>v^(class<bar>def)<Bslash>s', 'b')<CR>
30-
vnoremap <buffer> ]M :call pymode#motion#vmove('^<Bslash>s*def<Bslash>s', '')<CR>
31-
vnoremap <buffer> [M :call pymode#motion#vmove('^<Bslash>s*def<Bslash>s', 'b')<CR>
14+
nnoremap <buffer> ]] :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', '')<CR>
15+
nnoremap <buffer> [[ :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', 'b')<CR>
16+
nnoremap <buffer> ]C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', '')<CR>
17+
nnoremap <buffer> [C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', 'b')<CR>
18+
nnoremap <buffer> ]M :<C-U>call pymode#motion#move('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', '')<CR>
19+
nnoremap <buffer> [M :<C-U>call pymode#motion#move('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 'b')<CR>
20+
21+
onoremap <buffer> ]] :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', '')<CR>
22+
onoremap <buffer> [[ :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', 'b')<CR>
23+
onoremap <buffer> ]C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', '')<CR>
24+
onoremap <buffer> [C :<C-U>call pymode#motion#move('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', 'b')<CR>
25+
onoremap <buffer> ]M :<C-U>call pymode#motion#move('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', '')<CR>
26+
onoremap <buffer> [M :<C-U>call pymode#motion#move('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 'b')<CR>
27+
28+
vnoremap <buffer> ]] :call pymode#motion#vmove('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', '')<CR>
29+
vnoremap <buffer> [[ :call pymode#motion#vmove('<Bslash>v^(class<bar>(async<Bslash>s+)<Bslash>=def)<Bslash>s', 'b')<CR>
30+
vnoremap <buffer> ]M :call pymode#motion#vmove('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', '')<CR>
31+
vnoremap <buffer> [M :call pymode#motion#vmove('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 'b')<CR>
3232
3333
onoremap <buffer> C :<C-U>call pymode#motion#select('^<Bslash>s*class<Bslash>s', 0)<CR>
3434
onoremap <buffer> aC :<C-U>call pymode#motion#select('^<Bslash>s*class<Bslash>s', 0)<CR>
3535
onoremap <buffer> iC :<C-U>call pymode#motion#select('^<Bslash>s*class<Bslash>s', 1)<CR>
3636
vnoremap <buffer> aC :<C-U>call pymode#motion#select('^<Bslash>s*class<Bslash>s', 0)<CR>
3737
vnoremap <buffer> iC :<C-U>call pymode#motion#select('^<Bslash>s*class<Bslash>s', 1)<CR>
3838
39-
onoremap <buffer> M :<C-U>call pymode#motion#select('^<Bslash>s*def<Bslash>s', 0)<CR>
40-
onoremap <buffer> aM :<C-U>call pymode#motion#select('^<Bslash>s*def<Bslash>s', 0)<CR>
41-
onoremap <buffer> iM :<C-U>call pymode#motion#select('^<Bslash>s*def<Bslash>s', 1)<CR>
42-
vnoremap <buffer> aM :<C-U>call pymode#motion#select('^<Bslash>s*def<Bslash>s', 0)<CR>
43-
vnoremap <buffer> iM :<C-U>call pymode#motion#select('^<Bslash>s*def<Bslash>s', 1)<CR>
39+
onoremap <buffer> M :<C-U>call pymode#motion#select('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 0)<CR>
40+
onoremap <buffer> aM :<C-U>call pymode#motion#select('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 0)<CR>
41+
onoremap <buffer> iM :<C-U>call pymode#motion#select('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 1)<CR>
42+
vnoremap <buffer> aM :<C-U>call pymode#motion#select('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 0)<CR>
43+
vnoremap <buffer> iM :<C-U>call pymode#motion#select('^<Bslash>s*<Bslash>(async<Bslash>s<Bslash>+<Bslash>)<Bslash>=def<Bslash>s', 1)<CR>
4444
4545
endif
4646

0 commit comments

Comments
 (0)