Skip to content

Instantly share code, notes, and snippets.

@rredkovich
Created July 25, 2015 11:06
Show Gist options
  • Save rredkovich/86e5ff044a129e611767 to your computer and use it in GitHub Desktop.
Save rredkovich/86e5ff044a129e611767 to your computer and use it in GitHub Desktop.
emacs config with python tools (anaconda, company)
(setq inhibit-startup-message t)
(tool-bar-mode -1)
(hl-line-mode )
(require 'package)
(push '("marmalade" . "http://marmalade-repo.org/packages/")
package-archives )
(push '("melpa" . "http://melpa.milkbox.net/packages/")
package-archives)
(package-initialize)
(require 'evil)
(evil-mode 1)
(eldoc-mode 1)
(setq x-alt-keysym 'meta)
(add-hook 'after-init-hook 'global-company-mode)
(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.
'(custom-safe-themes (quote ("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "a8245b7cc985a0610d71f9852e9f2767ad1b852c2bdea6f4aadc12cce9c4d6d0" default)))
'(safe-local-variable-values (quote ((encoding . utf-8)))))
(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.
)
;; colored cursor
(setq evil-emacs-state-cursor '("red" box))
(setq evil-normal-state-cursor '("green" box))
(setq evil-visual-state-cursor '("orange" box))
(setq evil-insert-state-cursor '("red" bar))
(setq evil-replace-state-cursor '("red" bar))
(setq evil-operator-state-cursor '("red" hollow))
;; python tools for emacs
;; anaconda for PEP8 and etc. stuff
;; company-anaconda for docs
(add-hook 'python-mode-hook 'eldoc-mode)
(eval-after-load 'company
'(push 'company-anaconda company-backends))
(add-hook 'python-mode-hook 'anaconda-mode)
;;(global-set-key "\t" 'company-complete-common)
;;Exit insert mode by pressing j and then j quickly
(setq key-chord-two-keys-delay 0.5)
(key-chord-define evil-insert-state-map "jj" 'evil-normal-state)
(key-chord-mode 1)
;; Custom fonts (doesn't work for some reason)
;;(add-to-list 'default-frame-alist '(font . "Inconcolata LGC-6"))
;;(set-face-attribute 'default t :font "Inconsolata LGC-6")
;; 80 Column rule
;;(setq-default header-line-format
;; (list " " (make-string 79 ?-) "|"))
(require 'whitespace)
(setq whitespace-style '(face empty tabs lines-tail trailing))
(global-whitespace-mode t)
(load-theme 'misterioso)
@rredkovich
Copy link
Author

pakage-activated-list
(column-marker company-anaconda anaconda-mode f dash s dash json-rpc company evil goto-last-change undo-tree f dash s goto-last-change json-rpc key-chord s solarized-theme undo-tree)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment