Last active
August 29, 2015 14:02
-
-
Save ahmadseleem/112793fbfa0da1fe3034 to your computer and use it in GitHub Desktop.
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
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
;; ................................................................ | |
(add-to-list 'load-path "~/.emacs.d/evil") | |
(require 'evil) | |
(evil-mode 1) | |
(setq evil-shift-width 2) | |
;; ................................................................ | |
;; ................................................................ | |
;; ;; backup~ ... | |
(setq make-backup-files nil) ; stop creating those backup~ files | |
(setq auto-save-default nil) ; stop creating those #autosave# files | |
;; ................................................................ | |
;; Textmate... | |
; | |
(add-to-list 'load-path "~/.emacs.d/vendor/textmate.el") | |
(require 'textmate) | |
;; if have Peepopen installed... | |
(add-to-list 'load-path "~/.emacs.d/vendor/") | |
(require 'peepopen) | |
(textmate-mode) | |
(setq ns-pop-up-frames nil) | |
(global-set-key [(super t)] 'peepopen-goto-file-gui) | |
;; ................................................................ | |
;; Neotree... | |
(add-to-list 'load-path "~/.emacs.d/vendor/neotree") | |
(require 'neotree) | |
;; Search with Ag ................................................... | |
(add-to-list 'load-path "~/.emacs.d/elpa/dash") | |
(add-to-list 'load-path "~/.emacs.d/elpa/s") | |
(add-to-list 'load-path "~/.emacs.d/elpa/ag") | |
(require 'ag) | |
; ;; ................................................................ | |
; ;; Enhanced-Ruby-Mode... | |
(add-to-list 'load-path "~/.emacs.d/elpa/Enhanced-Ruby-Mode") | |
(autoload 'enh-ruby-mode "enh-ruby-mode" "Major mode for ruby files" t) | |
(add-to-list 'auto-mode-alist '("\\.rb$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.rake$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Rakefile$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.gemspec$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("\\.ru$" . enh-ruby-mode)) | |
(add-to-list 'auto-mode-alist '("Gemfile$" . enh-ruby-mode)) | |
(add-to-list 'interpreter-mode-alist '("ruby" . enh-ruby-mode)) | |
(setq enh-ruby-bounce-deep-indent t) | |
(setq enh-ruby-hanging-brace-indent-level 2) | |
; ;; ................................................................ | |
; ;; QuickRun... | |
(add-to-list 'load-path "~/.emacs.d/elpa/quickrun") | |
(require 'quickrun) | |
(define-key evil-normal-state-map (kbd "s-r") 'quickrun) | |
(define-key evil-visual-state-map (kbd "s-r") 'quickrun) | |
(define-key evil-normal-state-map (kbd "s-j") 'quickrun-eval-print) | |
(define-key evil-visual-state-map (kbd "s-j") 'quickrun-eval-print) | |
; (defun qrun-display () | |
; (set-face-attribute 'default nil | |
; :height | |
; (- (face-attribute 'default :height) | |
; 5))) | |
; | |
; (add-hook 'quickrun 'qrun-display) | |
; ;; ............................................................... | |
; ;; Rubocop... | |
; (add-to-list 'load-path "~/.emacs.d/elpa/dash") | |
; (add-to-list 'load-path "~/.emacs.d/elpa/rubocop") | |
; (require 'rubocop) | |
; (rubocop-mode t) | |
; (add-hook 'ruby-mode-hook 'rubocop-mode) | |
; ;; SML .......................................................... | |
(add-to-list 'load-path "~/.emacs.d/vendor/sml") | |
(autoload 'sml-mode "sml-mode" "Major mode for editing SML." t) | |
(autoload 'run-sml "sml-proc" "Run an inferior SML process." t) | |
(add-to-list 'auto-mode-alist '("\\.\\(sml\\|sig\\)\\'" . sml-mode)) | |
(setq sml-indent-level 2) ; conserve on horizontal space | |
;; ................................................................ | |
;; Web-mode... | |
(add-to-list 'load-path "~/.emacs.d/vendor/web-mode") | |
(require 'web-mode) | |
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode)) | |
;; ................................................................ | |
;; Liquid... | |
(add-to-list 'load-path "~/.emacs.d/vendor/liquid-mode") | |
(require 'liquid-mode) | |
; = settings -- | |
(setq neo-show-header nil) ;; Hide help line | |
(add-hook 'neotree-mode-hook (lambda () (hl-line-mode 1))) | |
; = Toggle (Evil) -- | |
(define-key evil-normal-state-map "\C-u" 'neotree-toggle) | |
(define-key evil-insert-state-map "\C-u" 'neotree-toggle) | |
(define-key evil-visual-state-map "\C-u" 'neotree-toggle) | |
; = Enter_Open_File_anywhere (Evil) -- | |
(define-key neotree-mode-map [return] 'neotree-enter) | |
(define-key neotree-mode-map (kbd "\C-g") 'neotree-refresh) | |
(define-key neotree-mode-map (kbd "C-<return>") 'neotree-change-root) | |
(define-key neotree-mode-map (kbd "s-i") 'neotree-hidden-file-toggle) | |
;; ................................................................ | |
;; Themes... | |
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") | |
(add-to-list 'load-path "~/.emacs.d/themes") | |
;(load-theme 'spacegray t) | |
(load-theme 'leuven t) | |
; Terminal Themes ... | |
(add-to-list 'load-path "~/.emacs.d/elpa/color-theme-approximate") | |
(require 'color-theme-approximate) | |
(color-theme-approximate-on) | |
;; Custom ............................................ | |
; (add-to-list 'load-path "~/.emacs.d/elpa/color-theme") | |
; (require 'color-theme) | |
; (color-theme-initialize) | |
; (load-file "~/.emacs.d/elpa/color-theme/themes/color-theme-mac-classic.el") | |
; | |
; (color-theme-mac-classic) | |
;; ................................................... | |
(set-face-background 'fringe "white") | |
(setq-default left-margin-width 0 right-margin-width 1) ; Define new widths. | |
(set-window-buffer nil (current-buffer)) ; Use them now. | |
;; ................................................................ | |
; Line Number : Pretty format | |
(setq linum-format " %d ") | |
;(global-visual-line-mode 2) | |
;; ................................................................ | |
(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. | |
'(coffee-tab-width 2) | |
'(custom-safe-themes | |
(quote | |
("027d0fde33fb50f4d3ce135589d28f99850bb45b1e833440c53e2e9440e4a1f2" default))) | |
'(inhibit-startup-screen 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. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment