Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8abc436

Browse files
committed
Updated docstring regex to allow folding of raw python strings
1 parent73620c4 commit8abc436

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎autoload/pymode/folding.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ let s:blank_regex = '^\s*$'
99
" Spyder, a very popular IDE for python has a template which includes
1010
" '@author:' ; thus the regex below.
1111
lets:decorator_regex='^\s*@\(author:\)\@!'
12-
lets:doc_begin_regex='^\s*[uU]\=\%("""\|''''''\)'
12+
lets:doc_begin_regex='^\s*[uUrR]\=\%("""\|''''''\)'
1313
lets:doc_end_regex='\%("""\|''''''\)\s*$'
1414
" This one is needed for the while loop to count for opening and closing
1515
" docstrings.
1616
lets:doc_general_regex='\%("""\|''''''\)'
17-
lets:doc_line_regex='^\s*[uU]\=\("""\|''''''\).\+\1\s*$'
17+
lets:doc_line_regex='^\s*[uUrR]\=\("""\|''''''\).\+\1\s*$'
1818
lets:symbol=matchstr(&fillchars,'fold:\zs.')" handles multibyte characters
1919
ifs:symbol==''
2020
lets:symbol=''
@@ -42,7 +42,7 @@ fun! pymode#folding#text() " {{{
4242
letline=substitute(line,'\t', onetab,'g')
4343

4444
letline=strpart(line,0, windowwidth-2-len(foldedlinecount))
45-
letline=substitute(line,'[uU]\=\%("""\|''''''\)','','')
45+
letline=substitute(line,'[uUrR]\=\%("""\|''''''\)','','')
4646
let fillcharcount= windowwidth-len(line)-len(foldedlinecount)+1
4747
returnline .'' .repeat(s:symbol, fillcharcount) .'' . foldedlinecount
4848
endfunction"}}}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp