Created
August 18, 2014 17:07
-
-
Save cwndrws/5f64eb9a1a467c5d146c to your computer and use it in GitHub Desktop.
My emacs config
This file contains hidden or 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
| (setq custom-file "~/.emacs-custom.el") | |
| (load custom-file) | |
| (package-initialize) | |
| (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
| ("marmalade" . "http://marmalade-repo.org/packages/") | |
| ("melpa" . "http://melpa.milkbox.net/packages/"))) | |
| ;; efff the chrome | |
| (tool-bar-mode -1) | |
| (scroll-bar-mode -1) | |
| (menu-bar-mode -1) | |
| ;; scratch buffer to be startup screen | |
| (setq inhibit-startup-screen t) | |
| ;; relative numbers | |
| (global-relative-line-numbers-mode 1) | |
| ;; load theme | |
| (add-to-list 'custom-theme-load-path "~/.emacs.d/themes") | |
| (set-cursor-color "#0a9dff") | |
| (provide 'init-themes) | |
| (load-theme 'badwolf t) | |
| ;; setup multi-term | |
| (add-to-list 'load-path "~/.emacs.d/multi-term/") | |
| (require 'multi-term) | |
| (setq multi-term-program "/bin/bash") | |
| ;; load up slime | |
| (add-to-list 'load-path "~/.emacs.d/slime") | |
| (require 'slime-autoloads) | |
| ;; set lisp system and stuff | |
| (setq inferior-lisp-program "/usr/local/bin/sbcl") | |
| (setq slime-contribs '(slime-fancy)) | |
| ;; go mode | |
| (add-to-list 'load-path "~/.emacs.d/go-mode") | |
| (require 'go-mode-load) | |
| (add-hook 'before-save-hook #'gofmt-before-save) | |
| ;; tramp mode for editing remote files | |
| (setq tramp-default-method "ssh") | |
| ;; evil mode | |
| (setq evil-want-C-u-scroll t) | |
| (require 'evil) | |
| (evil-mode 1) | |
| ;; ftw window nav | |
| (add-to-list 'load-path "~/.emacs.d/ftw/") | |
| (require 'ftw) | |
| (ftw-mode 1) | |
| ;;; Frame size manipulation. | |
| (defun rmm5t-init-fullscreen () | |
| (toggle-frame-fullscreen) | |
| (global-set-key (kbd "<s-return>") 'toggle-frame-fullscreen)) | |
| (defun rmm5t-init-ns-fullscreen () | |
| (ns-toggle-fullscreen) | |
| (global-set-key (kbd "<s-return>") 'ns-toggle-fullscreen)) | |
| (defun rmm5t-init-maxframe () | |
| ;; Biggest monitor width I currently have. This is necessary when multiple | |
| ;; monitors exist; otherwise, the frame will span multiple displays. | |
| (setq mf-max-width 2560) | |
| (add-hook 'window-setup-hook 'maximize-frame t) | |
| (global-set-key (kbd "<s-return>") 'mf)) | |
| (if (window-system) | |
| (cond | |
| ((fboundp 'toggle-frame-fullscreen) | |
| (rmm5t-init-fullscreen)) | |
| ((fboundp 'ns-toggle-fullscreen) | |
| (rmm5t-init-ns-fullscreen)) | |
| (t | |
| (rmm5t-init-maxframe)) | |
| )) | |
| ;; Font size key bindings | |
| (global-set-key (kbd "s-=") 'text-scale-increase) | |
| (global-set-key (kbd "s--") 'text-scale-decrease) | |
| ;; org mode | |
| (add-to-list 'load-path "~/.emacs.d/org-mode") | |
| (require 'org) | |
| (define-key global-map "\C-cl" 'org-store-link) | |
| (define-key global-map "\C-ca" 'org-agenda) | |
| (setq org-log-done t) | |
| ;; Show the function name the cursor is in, | |
| ;; display 'n/a' if it's not in one | |
| (which-function-mode) | |
| (setq which-func-unknown "") | |
| (when (memq window-system '(mac ns)) | |
| (exec-path-from-shell-initialize) | |
| (exec-path-from-shell-copy-env "GOPATH")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment