mchangun
mchangun

Reputation: 10322

Argument list when calling a function

I'm using the Mac OS X version of Sublime Text 2. The autocomplete of a function is pretty nice - but I'm wondering if it's possible to have an argument list when you are calling a function to remind yourself how many and what arguments need to be passed? My function is defined as:

import math

def area_polygon(n, s):
  return (0.25 * n * s ** 2) / math.tan(math.pi / n)

It would be useful if I get an argument list after I type area_polygon() within the brackets (or as a dropdown) so I know what to pass in.

Thanks.

Upvotes: 1

Views: 3093

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1121844

Use a source code analysis plugin; there are several to choose from, offering different levels of integration and auto-completion, and support for Sublime Text 2 and / or 3.

  • SublimeCodeIntel - Full-featured code intelligence and smart autocomplete engine
  • SublimePythonIDE - ST3 only: A rewrite of SublimeRope for ST3, uses the Rope library to add python completions and refactoring to ST3
  • Python-Auto-Complete - A Sublime Text 2 plugin which adds additional auto-completion capability to Python scripts
  • SublimeRope - ST2 only, use SublimePythonIDE with ST3: Adds Python completions and some IDE-like functions to Sublime Text 2, through the use of the Rope library

All packages are available through Sublime Package Control.

Upvotes: 5

Related Questions