Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2003-06-28 07:49:44
Size: 1350
Editor: 0x50c48073
Comment:
Revision 7 as of 2013-09-24 21:25:48
Size: 1818
Editor: PaulBoddie
Comment: The svn link is broken; linked to archived versions.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

  * new version 16/10-2003
    * now runs on windows, does not need rlcompleter
    * significantly simpler
    * now got install instructions for auto-load
Line 11: Line 16:
  1. pressing [f1] brings up help on a python symbol before point (just what "help(thingy)" gives   1. pressing [f1] brings up help on a python symbol before point (just what "help(thingy)") gives
Line 13: Line 18:
  1. pressing "(" tries to parse the preceeding tokens as a funtion or method, and retrieve the signature via the "inspect" module, and messages it to you   1. pressing "(" or [f2] tries to parse the preceeding tokens as a funtion or method, and retrieve the signature via the "inspect" module, and messages it to you
Line 23: Line 28:
Get it from http://www.slog.dk/~jensen/elisp/index.html as: http://www.slog.dk/~jensen/elisp/py-complete.el: Get it directly from SVN: [[http://web.archive.org/web/*/http://slog.dk/svn/home/jensen/emacs-lisp/addon/py-complete.el|http://slog.dk/svn/home/jensen/emacs-lisp/addon/py-complete.el]] (link to archived versions)
Line 30: Line 35:
 * 2007-02-15 add
Line 31: Line 37:
also check this:
[[http://timchen119.blogspot.com/2007/02/bash-like-tab-completion-in-emacs.html|Bash-like Tab Completion in Emacs python-mode]]

----
CategoryEditors

Python Completion in emacs

  • new version 16/10-2003
    • now runs on windows, does not need rlcompleter
    • significantly simpler
    • now got install instructions for auto-load

I whipped up some support for completion of python code when using emacs, which basically completes based on the stuff in scope in the current interactive python session. It's rather crude, but seems to work rather nice for me at least.

Several uses are supported:

  1. hippie-expand support via try-complete-py-complete-symbol, just like the lisp-version, nice for the [S-tab] hungry.
  2. minibuffer-complete, pressing [M-return] brings up a minibuffer completion of the expression before point, usefull if you want to get an overview of your options.
  3. pressing [f1] brings up help on a python symbol before point (just what "help(thingy)") gives
  4. pressing "(" or [f2] tries to parse the preceeding tokens as a funtion or method, and retrieve the signature via the "inspect" module, and messages it to you
  5. pressing "," shows last signature.
  6. tries to work for both py-execute-buffer and py-execute-import-or-reload oriented work-styles.

TRICK: (4+5) is great for calling functions like:

  • string.join

where I can _never_ remember whether it's the list or seperator first

Get it directly from SVN: http://slog.dk/svn/home/jensen/emacs-lisp/addon/py-complete.el (link to archived versions)

Feel free to suggest improvements, or to just improve the code yourself.

-- Helge

  • 2007-02-15 add

also check this: Bash-like Tab Completion in Emacs python-mode


CategoryEditors

EmacsPythonCompletion (last edited 2013-09-24 21:25:48 by PaulBoddie)

Unable to edit the page? See the FrontPage for instructions.