Emacs for Python, Customization

Publicado el: 29 julio 2019
en el canal de: linuxhint
19,618
108

You want to gain the full power of EMACS to be a more efficient Python progammer. In this video, we have seen how we can turn our Emacs editor into a functional python IDE. We have used elpy for turning our editor into an IDE. You can follow the video step by step and have your Emacs turned into python IDE. You can create .emacs.d/init.el file inside emacs as well.
Copy paste this inside init.el file:

;; init.el --- Emacs configuration

;; Set OSX function key as Meta
;; INSTALL PACKAGES
;; --------------------------------------
(require 'package)
(add-to-list 'package-archives
'("elpy" . "http://jorgenschaefer.github.io/packa..."))

(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)

;; activate all packages
(package-initialize)
;; fetch the list of packages available
(unless package-archive-contents
(package-refresh-contents))

;; define list of packages to install

(defvar myPackages
'(better-defaults
material-theme
exec-path-from-shell
elpy
pyenv-mode))

;; install all packages in list

(mapc #'(lambda (package)
(unless (package-installed-p package)
(package-install package)))
myPackages)

;; Use shell's $PATH

(exec-path-from-shell-copy-env "PATH")

;; BASIC CUSTOMIZATION
;; --------------------------------------
(setq inhibit-startup-message t) ;; hide the startup message
(load-theme 'material t) ;; load material theme
(global-linum-mode t) ;; enable line numbers globally
(setq linum-format "%4d \u2502 ") ;; format line number spacing

;; Allow hash to be entered

(global-set-key (kbd "M-3") '(lambda () (interactive) (insert "#")))

;; define list of packages to install

(defvar myPackages
'(better-defaults
material-theme
elpy))

(elpy-enable)
(pyenv-mode)
(setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt")
;; init.el ends here

Install Using PIP:
jedi
autopep8
flake8
ipython
importmagic
yapf


En esta página del sitio puede ver el video en línea Emacs for Python, Customization de Duración hora minuto segunda en buena calidad , que subió el usuario linuxhint 29 julio 2019, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 19,618 veces y le gustó 108 a los espectadores. Disfruta viendo!