Created
October 12, 2017 23:40
-
-
Save waltervargas/b307caa15854fb647878162d50475c9b to your computer and use it in GitHub Desktop.
Spacemacs user-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
;; Start an emacs server when start | |
(server-start) | |
(setq dotspacemacs-folding-method 'origami) | |
;; magit | |
(setq-default git-magit-status-fullscreen t) | |
(setq magit-repository-directories '("~/git/")) | |
(setq global-git-commit-mode t) | |
;; osx copy/paste | |
(defun copy-from-osx () | |
(shell-command-to-string "pbpaste")) | |
(defun paste-to-osx (text &optional push) | |
(let ((process-connection-type nil)) | |
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) | |
(process-send-string proc text) | |
(process-send-eof proc)))) | |
(setq interprogram-cut-function 'paste-to-osx) | |
(setq interprogram-paste-function 'copy-from-osx) | |
(global-set-key [mouse-4] 'scroll-down-line) | |
(global-set-key [mouse-5] 'scroll-up-line) | |
(global-set-key [C-mouse-4] 'text-scale-increase) | |
(global-set-key [C-mouse-5] 'text-scale-decrease) | |
;;; Haskell Mode | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan) | |
(eval-after-load "haskell-mode" | |
'(define-key haskell-mode-map (kbd "C-c C-c") 'haskell-compile)) | |
(eval-after-load "haskell-cabal" | |
'(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-compile)) | |
;;; Org Mode Customizations | |
(setq org-default-notes-file (concat org-directory "/notes.org")) | |
(define-key global-map "\C-cc" 'org-capture) | |
(global-set-key "\C-cl" 'org-store-link) | |
(global-set-key "\C-ca" 'org-agenda) | |
(global-set-key "\C-cc" 'org-capture) | |
(global-set-key "\C-cb" 'org-iswitchb) | |
;; Org-mode setup Faces for TODO keywords | |
(setq org-todo-keyword-faces | |
'(("WORKING" . font-lock-type-face) | |
("CANCELED" . ahs-face))) | |
;; Switch entry to DONE when all subentries are done, to TODO otherwise." | |
(defun org-summary-todo (n-done n-not-done) | |
"Switch entry to DONE when all subentries are done, to TODO otherwise." | |
(let (org-log-done org-log-states) ; turn off logging | |
(org-todo (if (= n-not-done 0) "DONE" "TODO")))) | |
(add-hook 'org-after-todo-statistics-hook 'org-summary-todo) | |
;; Org-mode setup Faces for priorities | |
(setq org-priority-faces | |
'(("[#A]" . org-scheduled-today))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment