We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ade0967 commit 411a74dCopy full SHA for 411a74d
2 files changed
autoload/pymode/folding.vim
@@ -1,8 +1,8 @@
1
" Python-mode folding functions
2
3
4
+let s:def_regex = g:pymode_folding_regex
5
let s:blank_regex = '^\s*$'
-let s:def_regex = '^\s*\%(class\|def\) \w\+'
6
let s:decorator_regex = '^\s*@'
7
let s:doc_begin_regex = '^\s*\%("""\|''''''\)'
8
let s:doc_end_regex = '\%("""\|''''''\)\s*$'
plugin/pymode.vim
@@ -32,6 +32,8 @@ call pymode#default("g:pymode_indent", 1)
32
33
" Enable/disable pymode folding for pyfiles.
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\+')
37
38
" Enable/disable python motion operators
39
call pymode#default("g:pymode_motion", 1)
0 commit comments