GithubHelp home page GithubHelp logo

marciomazza / vim-autopep8 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tell-k/vim-autopep8

0.0 2.0 0.0 28 KB

autopep8 plugin for Vim

Home Page: http://www.vim.org/scripts/script.php?script_id=4614

Vim Script 100.00%

vim-autopep8's Introduction

vim-autopep8

vim-autopep8 is a Vim plugin that applies autopep8 to your current file. autopep8 automatically formats Python code to conform to the PEP 8 style guide.

Required

Installation

Simply put the contents of this repository in your ~/.vim/bundle directory.

Documentation (Read The Docs)

Usage

shortcut

  1. Open Python file.
  2. Press <F8> to run autopep8 on it

call function

:Autopep8

with arguments

:Autopep8 --range 1 5

or

:call Autopep8(" --range 1 5")

Customization

If you don't want to use the <F8> key for autopep8, simply remap it to another key. It autodetects whether it has been remapped and won't register the <F8> key if so. For example, to remap it to <F3> instead, use:

autocmd FileType python map <buffer> <F3> :call Autopep8()<CR>

Do not fix these errors/warnings (default: E226,E24,W6)

let g:autopep8_ignore="E501,W293"

Fix only these errors/warnings (e.g. E4,W)

let g:autopep8_select="E501,W293"

Maximum number of additional pep8 passes (default: 100)

let g:autopep8_pep8_passes=100

Set maximum allowed line length (default: 79)

let g:autopep8_max_line_length=79

Enable possibly unsafe changes (E711, E712) (default: non defined)

let g:autopep8_aggressive=1

Number of spaces per indent level (default: 4)

let g:autopep8_indent_size=2

Disable show diff window

let g:autopep8_disable_show_diff=1

vim-autopep8's People

Contributors

jseabold avatar liuyang1 avatar tell-k avatar tocer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.