Created
March 2, 2016 16:33
-
-
Save pablopalacios/b27c24ce13daee0242fa to your computer and use it in GitHub Desktop.
My Emacs conf file for Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; STYLE | |
(load-theme 'wombat) | |
(set-frame-font "-adobe-Source Code Pro-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1") | |
(blink-cursor-mode 0) | |
(scroll-bar-mode 0) | |
(menu-bar-mode 0) | |
(tool-bar-mode 0) | |
(tooltip-mode 0) | |
(show-paren-mode) | |
(column-number-mode t) | |
(capitalized-words-mode t) | |
(ido-mode t) | |
(setq ido-auto-merge-work-directories-length -1) | |
(setq-default indent-tabs-mode nil) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(global-set-key "\C-xg" 'magit-status) | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) | |
(pyenv-mode) | |
(require 'yasnippet) | |
(yas-reload-all) | |
(add-hook 'python-mode-hook 'yas-minor-mode) | |
(add-hook 'python-mode-hook 'anaconda-mode) | |
(eval-after-load "company" | |
'(progn | |
(add-to-list 'company-backends 'company-anaconda) | |
)) | |
(add-hook 'python-mode-hook 'company-mode) | |
(add-hook 'python-mode-hook 'eldoc-mode) | |
(require 'web-mode) | |
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) | |
(setq web-mode-engines-alist '(("django" . "\\.html\\'"))) | |
(defun pp-web-mode-hook () | |
(setq web-mode-markup-indent-offset 2) | |
(setq web-mode-code-indent-offset 4)) | |
(add-hook 'web-mode-hook 'pp-web-mode-hook) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(company-idle-delay 0.2) | |
'(company-minimum-prefix-length 1)) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment