Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
funcs.el Updated elpy layer; added latexp layer Nov 5, 2017

elpy layer

A Spacemacs layer that allows to work with Python in style similar to ESS. The layer is based on elpy and is an alternative to the python layer of Spacemacs.

Most of the functionality originally provided by this layer has meanwhile been integrated into elpy. This layer now mainly sets things up an adds suitable keybindings.

Sending code fragments to the shell

Provides keybindings to send a Python statement, function definition, a class definition, a top-level statement, a group of Python statements, a cell, a region, or a buffer to the Python shell.

Each evaluation function has four variants, one for each combination of: whether or not the point should move after sending (“step”), and whether or not the Python shell should be focused after sending (“go”).

These commands are bound to prefix ~,e~ (send and keep point) and prefix ~,s~ (send and step). The suffixes are e for statement, f for function, c for class, s for top-level statement, g for group (sequence of top-level statements not separated by a blank line), w for cell, r for region, and b for buffer. Capital suffix letters focus on the Python shell after sending.

For example:

~,ef~Evaluate current function and keep the point where it is
~,eF~Evaluate current function, keep the point where it is, and switch focus to the Python shell
~,sf~Evaluate current function and move point to first subsequent statement
~,sF~Evaluate current function, move point to first subsequent statement, and switch focus to the Python shell


~,td~Toggle whether to show the shell buffer after sending something to it
~,ti~Toggle whether to show code fragments sent to the shell in the shell buffer
~,to~Toggle whether to show shell outputs in the echo area

python-mode bindings


inferior-python-mode bindings

In the Python shell, C-r is bound to counsel the shell history.

You can’t perform that action at this time.