public
Created

my dot .emacs file

  • Download Gist
.emacs
Emacs Lisp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
;;; Packages manager for Emacs
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
 
;;;
;;; Keybindings
(global-set-key [(f5)] 'ack)
(global-set-key (kbd "C-x ;") 'kill-some-buffers)
(define-key global-map (kbd "RET") 'newline-and-indent) ; When pressing RET (Enter) makes a new line and ident it
 
;; map the window manipulation keys to meta 0, 1, 2, o
(global-set-key (kbd "M-3") 'split-window-horizontally) ; was digit-argument
(global-set-key (kbd "M-2") 'split-window-vertically) ; was digit-argument
(global-set-key (kbd "M-1") 'delete-other-windows) ; was digit-argument
(global-set-key (kbd "M-0") 'delete-window) ; was digit-argument
(global-set-key (kbd "M-o") 'other-window) ; was facemenu-keymap
(global-set-key (kbd "M-O") 'rotate-windows)
;; End of Window Manipulation
 
;; Evil
(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
 
;; Things that enhance Evil
(define-key evil-normal-state-map [escape] 'keyboard-quit)
(define-key evil-visual-state-map [escape] 'keyboard-quit)
(define-key minibuffer-local-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-ns-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-completion-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-must-match-map [escape] 'minibuffer-keyboard-quit)
(define-key minibuffer-local-isearch-map [escape] 'minibuffer-keyboard-quit)
 
(define-key evil-normal-state-map (kbd "C-u") 'evil-scroll-up)
 
 
;; Setting some things up for ido-mode
(require 'ido)
(setq ido-enable-flex-matching t) ;; enables fuzzy matching
(setq ido-everywhere t)
(setq ido-use-filename-at-point 'guess)
(setq ido-create-new-buffer 'always)
(setq ido-ignore-extensions t)
(ido-mode t)
 
;; Uniqueify
(require 'uniquify)
 
;;;Plugins
(add-hook 'after-init-hook #'global-flycheck-mode) ;Flycheck
(add-to-list 'load-path "~/.emacs.d/elpa/sr-speedbar-20130309.1959") ; Speedbar
(require 'sr-speedbar)
(global-set-key [(f2)] 'sr-speedbar-toggle)
(global-set-key [(f3)] 'sr-speedbar-refresh-toggle)
 
(add-to-list 'load-path "~/.emacs.d/elpa/js2-mode-20130725.125")
(require 'js2-mode)
 
;;Auto-complete
(add-to-list 'load-path "~/.emacs.d/auto-complete-1.3.1")
(require 'auto-complete)
(global-auto-complete-mode t)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(require 'auto-complete-config)
(ac-config-default)
 
;;; Misc
(tool-bar-mode -1)
(menu-bar-mode -1)
(scroll-bar-mode -1)
(global-hl-line-mode +1)
(global-linum-mode t)
 
(transient-mark-mode 1) ; makes the region visible
(line-number-mode 1) ; makes the line number show up
(column-number-mode 1) ; makes the column number show up
 
(set-frame-font "Inconsolata")
(set-face-attribute 'default nil :height 105)
 
(fset 'yes-or-no-p 'y-or-n-p) ;; Makes the default yes and no to just y and n
(setq inhibit-startup-echo-area-message t) ; Removes the Startup-screen
(setq inhibit-startup-message t) ; Removes the Startup-screen
(setq initial-buffer-choice "~/Documents/Org/TODO.org") ; Starts my TODO.org file instead of standard screen
 
;; System Name
(setq frame-title-format '("Emacs @ " system-name ": %b %+%+ %f"))
 
;; Themes
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(setq molokai-theme-kit t)
(load-theme 'molokai t)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.