ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Super​Python

by clarabstract ST2/ST3

Adds tab-completion to Python's somewhat verbose super() construct.

Details

Installs

  • Total 4K
  • Win 2K
  • OS X 724
  • Linux 1K
Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8
Windows 0 1 0 2 2 1 0 2 0 0 1 5 1 1 2 0 1 1 2 1 0 2 1 1 1 1 0 1 1 0 2 1 2 2 0 1 1 0 1 0 1 0 2 1 4 1
OS X 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0
Linux 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 0 3 2 2 0 0 0 0 1 1 1 0 1 0 0 0 1 0 1 1 2 1 0 1 1

Readme

Source
raw.​githubusercontent.​com

SuperPython

Adds tab-completion to Python's somewhat verbose super() construct. Just hit tab after a super keyword and a snippet will be inserted contained the likely current class and method name, with the existing arguments already filled.

Example:

class AHappyClass(JustSwellBase):
    def __init__(self, required_arg, and_another, *anything_else, **enough_already):
        super#<tab>

# Becomes:

class AHappyClass(JustSwellBase):
    def __init__(self, required_arg, and_another, *anything_else, **enough_already):
        super(AHappyClass, self).__init__(required_arg, and_another, *anything_else, **enough_already)

SublimeText's own parsing is used to guess the “current” class name, method name and arguments. Also snippet checks indent of current line to find appropriate class and method more accurately in cases if there's an inner class or method definition between the call to super and the real method signature.

Installation

You know the drill. To install this plugin, you have two options:

  1. Package Control (recommended). If you have Sublime Package Control installed, simply search for SuperPython to install.

  2. Manual. Clone source code to Sublime Text Packages folder:

$ git clone https://github.com/rubyruy/SuperPython