vim-autopep8


Ⅰ. 插件描述

Autopep8 Vim Script

Ⅱ. 基本信息

创建日期:  2014-02-18
使用用户:  1
Github星:  1
插件作者:  Björn Ricks

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'bjoernricks/vim-autopep8-own-character'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'bjoernricks/vim-autopep8-own-character'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'bjoernricks/vim-autopep8-own-character'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/bjoernricks/vim-autopep8

Ⅳ. 文档说明

vim-autopep8

A vim plugin that uses autopep8_ to format your (selected) python code in a vim
buffer to conform to the PEP 8_ style guide.

.. _autopep8: https://github.com/hhatto/autopep8/
.. _PEP 8: http://www.python.org/dev/peps/pep-0008/

In difference to the vim vim-autopep8_ it doesn't require to install the
autopep8 python script in $PATH.

.. _vim-autopep8: https://github.com/tell-k/vim-autopep8

Installation

Please use pathogen_ to install vim-autopep8 as a bundle::

cd ~/.vim/bundle
git clone https://github.com/bjoernricks/vim-autopep8.git

.. _pathogen: https://github.com/tpope/vim-pathogen

Either install autopep8_ via pip::

pip install autopep8

or run::

cd ~/.vim/bundle/vim-autopep8.git
git submodule update --init

Usage

Open a python file and press <F9> to format the complete buffer. Also you can
select a piece of code in visual mode and press <F9> to only reformat the
selection.

添加新评论