Emacs settings for Python development environment

I tried 100 knocks with Python and it took a long time to write various things, so I set the following contents in emacs and improved the development environment.

~/emacs.d/init.el Add the following contents to

;; init.el --- Emacs configuration

;; INSTALL PACKAGES
;; --------------------------------------

(require 'package)

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

(package-initialize)
(when (not package-archive-contents)
  (package-refresh-contents))

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

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

;; BASIC CUSTOMIZATION
;; --------------------------------------

(setq inhibit-startup-message t)
(load-theme 'material t) 
(global-linum-mode t) ;; enable line number globally

;;rectangular selection
(cua-mode t)
(setq cua-enable-cua-keys nil)

;;disable making back-up file
(setq make-backup-files nil)

;;active save history mode and keep 500 history records
(savehist-mode 1)
(setq history-length 500)

;; SETUP PYTHONMODE
;;---------------------------------------

(defvar myPackages
	'(better-defaults
	elpy ;;add elpy package
	material-theme))

;; active auto-complete by jedi
(elpy-enable)
(elpy-use-ipython)
(setq elpy-rpc-backend "jedi")

;; active flycheck instead of flymake
(when (require 'flycheck nil t)
	(remove-hook 'elpy-modules 'elpy-module-flymake)
	(add-hook 'elpy-mode-hook 'flycheck-mode))

(defvar myPackages
	'(better-defaults
	smartrep ;;add smartrep package
	material-theme))

(define-key elpy-mode-map (kbd "C-c C-v") 'helm-flycheck)
(require 'smartrep)
(smartrep-define-key elpy-mode-map "C-c"
	'(("C-n" . flycheck-next-error)
	("C-p" . flycheck-previous-error)))

;; setup indent hiright
(set-face-background 'highlight-indentation-face "#313131")
(set-face-background 'highlight-indentation-current-column-face "#777777")
(add-hook 'elpy-mode-hook 'highlight-indentation-current-column-mode)

;;(setq twittering-curl-program "/usr/bin/curl")

;; init.el ends here

Reference material I investigated the Python development environment of Mac and Emacs http://umi-uyura.hatenablog.com/entry/2016/05/09/000613

Personal Emacs settings for Python http://org-technology.com/posts/emacs-elpy.html

Emacs - the Best Python Editor? https://realpython.com/blog/python/emacs-the-best-python-editor/

Wow ... my Emacs is too hard to use? If so ... Castamy's sushi !! http://d.hatena.ne.jp/sandai/20120304/p2

Recommended Posts

Emacs settings for Python development environment
[For organizing] Python development environment
python environment settings
Python development environment options for May 2020
Emacs Python development environment construction memo
Building a Python development environment for AI development
Python development environment construction
About Python development environment
python2.7 development environment construction
Development environment in Python
Python environment for projects
Development environment suitable for ArcPy
Python environment construction (Windows10 + Emacs)
Python environment construction For Mac
Python3 environment construction (for beginners)
Organize your Python development environment
[ev3dev × Python] Build ev3dev development environment
[MEMO] [Development environment construction] Python
Summary of python environment settings for myself [mac] [ubuntu]
python memo (for myself): About the development environment virtualenv
Snippet settings for python jupyter notebook
Prepare Python development environment on Ubuntu
[For beginners] Django -Development environment construction-
Building a development environment for Android apps-creating Android apps in Python
Prepare your first Python development environment
[Python3] Development environment construction << Windows edition >>
Python development environment construction on macOS
Build a GVim-based Python development environment on Windows 10 (2) Basic settings
Vim + Python development environment setting memo
Smooth Python development environment for teams [Poetry + pyenv + black + isort]
Install Python development environment on Windows 10
Python3 TensorFlow for Mac environment construction
Checking the NAOqi Python development environment
Prepare Python development environment with Atom
[Linux] [Initial Settings] Table of Contents for Development Environment Setup
Competitive programming with python Local environment settings
Python (anaconda) development environment construction procedure (SpringToolsSuites) _2020.4
Build an environment for Blender built-in Python
[Development environment] Python with Xcode [With screen transition]
Blender 2.82 or later + python development environment notes
Let's create a virtual environment for Python
6 Python libraries for faster development and debugging
How to prepare Python development environment [Mac]
Python3 + venv + VSCode + macOS development environment construction
[Mac] Building a virtual environment for Python
Prepare the development environment for keyhac for Mac
Construction of development environment for Choreonoid class
Build Python development environment (pythonz, virtualenv, direnv)
The strongest Python development environment PyCharm's recommendation
Creating a development environment for machine learning
Windows + gVim + Poetry python development environment construction
The strongest Python integrated development environment PyCharm
2016-10-30 else for Python3> for:
Prepare Python development environment for each project in Windows environment (VSCode + virtualEnvWrapper + Pylint)
Create a Python development environment locally at the fastest speed (for beginners)
Python environment construction
python windows environment
python environment construction
Python --Environment construction
Python environment construction
python environment construction