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

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion 4 autoload/pymode/indent.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ function! pymode#indent#get_indent(lnum)
if closing_paren
return indent(parlnum)
else
return indent(parlnum) + &shiftwidth
let l:indent_width = (g:pymode_indent_hanging_width > 0 ?
\ g:pymode_indent_hanging_width : &shiftwidth)
return indent(parlnum) + l:indent_width
endif
else
return parcol
Expand Down
10 changes: 10 additions & 0 deletions 10 doc/pymode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ Enable pymode indentation *'g:pymode_indent'
>
let g:pymode_indent = 1


Customization:

Hanging indent size after an open parenthesis or bracket (but nothing after the
parenthesis), when vertical alignment is not used. Defaults to `&shiftwidth`.
*'g:pymode_indent_hanging_width'*
>
let g:pymode_indent_hanging_width = &shiftwidth
let g:pymode_indent_hanging_width = 4

-------------------------------------------------------------------------------
2.3 Python folding ~
*pymode-folding*
Expand Down
3 changes: 3 additions & 0 deletions 3 plugin/pymode.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ call pymode#default('g:pymode_doc_bind', 'K')
" Enable/Disable pymode PEP8 indentation
call pymode#default("g:pymode_indent", 1)

" Customize hanging indent size different than &shiftwidth
call pymode#default("g:pymode_indent_hanging_width", -1)

" TODO: currently folding suffers from a bad performance and incorrect
" implementation. This feature should be considered experimental.
" Enable/disable pymode folding for pyfiles.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.