;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; C-z under xmonad does nothing useful, and Emacs 23 gets confused ;; (needs to be de-focused and re-focused to de-confuse). Disable C-z. ;; ;; Also, disable C-x C-z. Also make zooming with C-+ etc works. ;; Added by Package.el. This must come before configurations of ;; installed packages. Don't delete this line. If you don't want it, ;; just comment it out by adding a semicolon to the start of the line. ;; You may delete these explanatory comments. (package-initialize) (when (display-graphic-p) (global-unset-key "\C-x\C-c") (global-unset-key "\C-z") (global-unset-key "\C-_") (global-unset-key (kbd "\C-x\C-z")) (global-unset-key (kbd "")) (global-set-key (kbd "C-=") 'text-scale-adjust) (global-set-key (kbd "C-+") 'text-scale-adjust) (global-set-key (kbd "C--") 'text-scale-adjust) (global-set-key (kbd "C-0") 'text-scale-adjust) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Tramp (require 'tramp) (customize-set-variable 'tramp-default-method "ssh") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Magit (global-set-key (kbd "C-x g") 'magit-status) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Show column numbers in the mode line. (column-number-mode t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Insert spaces instead of TAB characters. (setq-default indent-tabs-mode nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Insert spaces instead of TAB characters, markdown-mode edition. (require 'markdown-mode) (add-hook 'markdown-mode-hook (lambda () (setq indent-tabs-mode nil) ) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; In Markdown mode, do not indent a line when Enter is pressed. (setq markdown-indent-on-enter nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; In Markdown mode, do NOT follow links when Enter is pressed. (setq-default markdown-follow-wiki-link-on-enter nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; In Python mode, turn off electric-indent-mode. (defun electric-indent-no-colon-indent-char () (set 'electric-indent-chars '(10))) (add-hook 'python-mode-hook 'electric-indent-no-colon-indent-char) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Turn on some modes automatically based on filename. (require 'go-mode) (setq auto-mode-alist '(("\\.mdwn\\'" . markdown-mode) ("\\.md\\'" . markdown-mode) ("\\.yarn\\'" . markdown-mode) ("\\.js\\'" . js-mode) ("\\.json\\'" . js-mode) ("Makefile" . makefile-mode) ("README" . markdown-mode) ("NEWS" . markdown-mode) ("COMMIT_EDITMSG\\'" . text-mode) ("\\.html\\'" . html-mode) ("\\.css\\'" . css-mode) ("\\.yaml\\'" . yaml-mode) ("\\.yml\\'" . yaml-mode) ("\\.ick\\'" . yaml-mode) ("\\.morph\\'" . yaml-mode) ("\\.heat\\'" . yaml-mode) ("\\.vmdb\\'" . yaml-mode) ("\\.py\\'" . python-mode) ("\\.sh\\'" . shell-script-mode) ("\\.hs\\'" . haskell-mode) ("\\.go\\'" . go-mode) ("\\.rs\\'" . rust-mode) ("\\.ledger\\'" . ledger-mode) ("\\.tex\\'" . tex-mode) ("mutt-.*" . mail-mode))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Turn on auto-fill-mode in all text modes automatically. (setq text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Do not make backup files when saving. (setq make-backup-files nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Enable X CLIPBOARD selection, instead of PRIMARY. (setq x-select-enable-clipboard t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Disable tool bar. (tool-bar-mode 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Don't require double spaces to end sentences. (setq sentence-end-double-space nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Don't show initial help on startup. (setq inhibit-startup-screen t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Don't show unwanted files with dired. ;; From: http://stackoverflow.com/questions/14850103/how-do-i-get-emacs-dired-to-ignore-uninteresting-file-extensions (require 'dired-x) (setq-default dired-omit-files-p t) (setq dired-omit-files (concat dired-omit-files "\\.pyc$")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Show directories in the Buffers menu. (setq buffers-menu-show-directories t) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; cc mode style. (setq c-default-style "linux") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28350 (eval-after-load "enriched" '(defun enriched-decode-display-prop (start end &optional param) (list start end))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; count words ;; https://raw.githubusercontent.com/tomaszskutnik/word-count-mode/master/word-count.el (setq load-path (cons (expand-file-name "~/.emacs.d/lisp") load-path)) (autoload 'word-count-mode "word-count" "Minor mode to count words." t nil) (autoload 'wc-mode "word-count" "Minor mode to count words." t nil) ;;;; ;(require 'cargo) (add-hook 'rust-mode-hook 'cargo-minor-mode) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Use custom-set-variables to set variables that cant' be set otherwise. ;; truncate-lines: ;; Don't wrap long lines when displaying them. Make me scroll ;; sideways instead. (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. '(column-number-mode t) '(package-selected-packages (quote (yaml-mode tabbar session pod-mode muttrc-mode mutt-alias markdown-mode magit initsplit htmlize graphviz-dot-mode go-mode folding eproject diminish debian-el csv-mode browse-kill-ring boxquote bm bar-cursor apache-mode ahungry-theme))) '(tool-bar-mode nil) '(truncate-lines t)) (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. '(default ((t (:family "Inconsolata" :foundry "PfEd" :slant normal :weight bold :height 200 :width normal)))))