The Wayback Machine - https://web.archive.org/web/20201206035651/https://github.com/hattya/python-indent.vim
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.rst

python-indent.vim

python-indent.vim is a Vim indent plugin for Python which complies with PEP 8.

https://ci.appveyor.com/api/projects/status/j20153feidmt9vai/branch/master?svg=true

Installation

Vundle

Plugin 'hattya/python-indent.vim'

vim-plug

Plug 'hattya/python-indent.vim', { 'for': 'python' }

dein.vim

call dein#add('hattya/python-indent.vim')

Requirements

  • Vim 7.4+

Configuration

g:python_indent_continue

Indent for a continuation line.

Default value: &sw

value = 1 + \
    2 + \
    3
value = func(
    1,
    2,
    3)

g:python_indent_right_bracket

If set to 1, a right bracket will be lined up under the first non-whitespace character of the last line.

Default:

value = [
    1,
    2,
    3,
]
value = func(
    1,
    2,
    3,
)

If set to 1:

value = [
    1,
    2,
    3,
    ]
value = func(
    1,
    2,
    3,
    )

g:python_indent_multiline_statement

If set to 1, add some extra indentation on the conditional continuation line.

Default:

if (isinstance(path, str) and
    os.path.isfile(path)):
    pass

If set to 1:

if (isinstance(path, str) and
        os.path.isfile(path)):
    pass

Testing

python-indent.vim uses themis.vim for testing.

$ cd /path/to/python-indent.vim
$ git clone https://github.com/thinca/vim-themis
$ ./vim-themis/bin/themis

License

python-indent.vim is distributed under the terms of the MIT License.

About

A Vim indent plugin for Python which complies with PEP 8

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.