Skip to content

Latest commit

 

History

History

elpy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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:

,efEvaluate current function and keep the point where it is
,eFEvaluate current function, keep the point where it is, and switch focus to the Python shell
,sfEvaluate current function and move point to first subsequent statement
,sFEvaluate current function, move point to first subsequent statement, and switch focus to the Python shell

Toggles

,tdToggle whether to show the shell buffer after sending something to it
,tiToggle whether to show code fragments sent to the shell in the shell buffer
,toToggle whether to show shell outputs in the echo area

python-mode bindings

,helpy-doc
,gaelpy-goto-assignment
,gAelpy-goto-assignment-other-window
,ggelpy-goto-definition
,goelpy-occur-definitions
,gGelpy-goto-definition-other-window
,gielpy-shell-switch-to-shell
,gIelpy-shell-switch-to-shell-in-current-window
,eeelpy-shell-send-statement
,eEelpy-shell-send-statement-and-go
,eselpy-shell-send-top-statement
,eSelpy-shell-send-top-statement-and-go
,efelpy-shell-send-defun
,eFelpy-shell-send-defun-and-go
,ecelpy-shell-send-defclass
,eCelpy-shell-send-defclass-and-go
,egelpy-shell-send-group
,eGelpy-shell-send-group-and-go
,ewelpy-shell-send-codecell
,eWelpy-shell-send-codecell-and-go
,erelpy-shell-send-region-or-buffer
,eRelpy-shell-send-region-or-buffer-and-go
,ebelpy-shell-send-buffer
,eBelpy-shell-send-buffer-and-go
,seelpy-shell-send-statement-and-step
,sEelpy-shell-send-statement-and-step-and-go
,sselpy-shell-send-top-statement-and-step
,sSelpy-shell-send-top-statement-and-step-and-go
,sfelpy-shell-send-defun-and-step
,sFelpy-shell-send-defun-and-step-and-go
,scelpy-shell-send-defclass-and-step
,sCelpy-shell-send-defclass-and-step-and-go
,sgelpy-shell-send-group-and-step
,sGelpy-shell-send-group-and-step-and-go
,swelpy-shell-send-codecell-and-step
,sWelpy-shell-send-codecell-and-step-and-go
,srelpy-shell-send-region-or-buffer-and-step
,sRelpy-shell-send-region-or-buffer-and-step-and-go
,sbelpy-shell-send-buffer-and-step
,sBelpy-shell-send-buffer-and-step-and-go
,Vapyvenv-activate
,Vdpyvenv-deactivate
,Vwpyvenv-workon
,ncelpy/insert-codecell-above
,nmelpy/insert-markdowncell-above

inferior-python-mode bindings

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

,gielpy-shell-switch-to-buffer
,gIelpy-shell-switch-to-buffer-in-current-window