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 709
  • Linux 1K
Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9
Windows 1 1 1 2 1 2 1 1 1 0 2 1 0 2 1 1 2 2 1 6 0 0 2 3 0 2 3 2 0 0 1 1 0 2 0 0 2 1 0 1 1 1 1 1 0
OS X 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1
Linux 0 1 0 0 0 0 0 1 2 0 1 0 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 2 1 0 0

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