Instantly share code, notes, and snippets.

What would you like to do?
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . ""))
(package-initialize) ;;
(global-font-lock-mode t)
(setq inhibit-startup-mesage t)
(setq make-backup-files nil)
(add-hook 'after-init-hook #'global-flycheck-mode)
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.yaml" . yaml-mode))
(require 'yasnippet)
(yas-global-mode 1)
(add-to-list 'load-path "~/.emacs.d") ;; check path
;; don't show these in dired
;; Get dired to consider .pyc and .pyo files to be uninteresting
(add-hook 'dired-load-hook
(lambda ()
(load "dired-x")
(add-hook 'dired-mode-hook
(lambda ()
(setq dired-omit-files-p t)
(setq dired-omit-files (concat dired-omit-files "\\|^\\..+$"))
(load "dired")
(setq dired-omit-extensions (append '(".pyc" ".pyo")
(add-hook 'python-mode-hook
'(lambda ()
(when (load "flymake" t)
(defun flymake-pylint-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
(local-file (file-relative-name
(file-name-directory buffer-file-name))))
(list "/usr/local/bin/flake8" (list local-file))))
;; check path
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pylint-init)))
;; 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.
'(column-number-mode t)
'(display-battery-mode t)
'(display-time-mode t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment