File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
" Python-mode folding functions
2
2
3
3
4
+ let s: def_regex = g: pymode_folding_regex
4
5
let s: blank_regex = ' ^\s*$'
5
- let s: def_regex = ' ^\s*\%(class\|def\) \w\+'
6
6
let s: decorator_regex = ' ^\s*@'
7
7
let s: doc_begin_regex = ' ^\s*\%("""\|'''''' \)'
8
8
let s: doc_end_regex = ' \%("""\|'''''' \)\s*$'
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ call pymode#default("g:pymode_indent", 1)
32
32
33
33
" Enable/disable pymode folding for pyfiles.
34
34
call pymode#default (" g:pymode_folding" , 1 )
35
+ " Change for folding customization (by example enable fold for 'if', 'for')
36
+ call pymode#default (" g:pymode_folding_regex" , ' ^\s*\%(class\|def\) \w\+' )
35
37
36
38
" Enable/disable python motion operators
37
39
call pymode#default (" g:pymode_motion" , 1 )
You can’t perform that action at this time.
0 commit comments