3

GitHub - Wilfred/pyimport: Manage Python imports from Emacs!

 2 years ago
source link: https://github.com/Wilfred/pyimport
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

pyimport

Manage Python imports from Emacs!

Installation: install from MELPA, or add pyimport.el to your load-path.

Unused Imports

Requires pyflakes to be installed.

Run M-x pyimport-remove-unused.

This requires pyflakes to be on PATH. Alternatively, set pyimport-pyflakes-path.

Insert Missing Imports

Place point on the missing variable, then run M-x pyimport-insert-missing.

This assumes that you have another Python buffer that contains an example of importing the variable.

I like to bind this to a key:

(define-key python-mode-map (kbd "C-c C-i") #'pyimport-insert-missing)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK