Giter VIP home page Giter VIP logo

pyyapf's Introduction

PyYapf

Sublime 2 plugin to run Yapf Python formatter

Ok campers, gather round.

This is a Sublime Text 2 plugin for Yapf

https://github.com/google/yapf

You will need to install yapf first. When I installed it:

  • I did a clone of the yapf git
  • changed dist.utils to setuptools in the setup.py
  • ran sudo python ./setup.py install

yapf is very much in active flux so I expect they will make it pip install-able soon.

I have PyYapf bound by default to ctrl-alt-f. You can also ctrl-shift-p then "PyYapf: Reformat Python".

##Installation

  1. First install yapf.
pip install yapf
  1. Install the PyYapf sublime-text plugin. I've submitted PyYapf to Package Control. We should have simple installs soon.

    Until then something like this should get it going (where ~/.config/sublime-text2/Packages/ is your sublime-text package directory):

 cd ~/.config/sublime-text2/Packages/
 git clone https://github.com/jason-kane/PyYapf.git
 ```

##Problems?

This makes it pretty easy to find valid python code that makes Yapf choke.  Please try to reduce the problem to a minimal example and let the Yapf folks know.  If there is something wrong with this plugin add an Issue on GitHub and I'll probably fix it.


##Sublime 2 Only (probably)

Once I get around to upgrading to Sublime 3 I'll update this plugin to work with both.

##LICENSE

YAPF is Apache v2 licenced, the lib2to3 from 2.7 is PSF v2; as far as I can tell the PSF is fine as long as I include the license.  Ditto with YAPF.  If I'm wrong let me know and I'll fix it.  For my part Apache v2 applies.  Do what you want; if you fix something please share it.

pyyapf's People

Contributors

jkane avatar jason-kane avatar

Watchers

Pavel Savchenko avatar James Cloos 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.