Advertisement
Guest User

Untitled

a guest
May 4th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.48 KB | None | 0 0
  1. ; ---------------------- Window settings -----------------------------
  2. (menu-bar-mode -1)
  3. (when window-system
  4. (tool-bar-mode -1)
  5. (tooltip-mode -1)
  6. (scroll-bar-mode -1))
  7.  
  8. (require 'package)
  9. (setq package-enable-at-startup nil)
  10. (add-to-list 'package-archives
  11. '("melpa" . "http://melpa.org/packages/") t)
  12. (package-initialize)
  13.  
  14. ;; Bootstrap use-package
  15. (unless (package-installed-p 'use-package)
  16. (package-refresh-contents)
  17. (package-install 'use-package))
  18. (require 'use-package)
  19. (use-package use-package-chords
  20. :ensure t
  21. :config (key-chord-mode 1))
  22.  
  23. ;; ---------------------- Global settings -----------------------------
  24.  
  25.  
  26. (setq initial-major-mode 'org-mode ; Sets the *scratch* to org mode as default
  27. initial-scratch-message nil ; Sets the *scratch* message
  28. inhibit-splash-screen t ; Prevents the Emacs Startup menu
  29. dired-omit-mode t ; Hides uninteresting files
  30. gc-cons-threshold 104857600 ; Set garbage-collecter to run at 100 MB
  31. frame-title-format '("Emacs @ " system-name ": %b %+%+ %f") ; Sets the window title to more useful
  32. backup-directory-alist `((".*" . ,temporary-file-directory)) ; Places all backup files in same folder
  33. auto-save-file-name-transforms `((".*" ,temporary-file-directory t)) ; Places all autosave files in same folder
  34. sentence-end-double-space nil ; Only one space after sentence
  35. echo-keystrokes 0.1 ; Show keystrokes at once in the bottom
  36. system-uses-terminfo nil ; Shell mode character fix
  37. password-cache-expiry (* 60 15) ; Time before asking for su pass again
  38. use-dialog-box nil) ; Prevent emacs from showing GUI-dialogs
  39.  
  40. (blink-cursor-mode -1) ; No blinking!
  41. (mouse-avoidance-mode 'animate) ; Move mouse away from cursor
  42. (global-hl-line-mode 1) ; Highlight current line
  43. (global-prettify-symbols-mode 1) ; Text to symbols
  44. (defalias 'yes-or-no-p 'y-or-n-p) ; y for yes, n for no. No confirmation
  45.  
  46. ;; Unbind suspend-frame keys
  47. (unbind-key "C-z")
  48. (unbind-key "C-x C-z")
  49.  
  50. ;; ---------------------- Built-in packages -----------------------------
  51. (use-package simple
  52. :demand
  53. :bind (("M-J" . join-line)
  54. ("M-j" . join-with-next-line))
  55. :config
  56. (defun join-with-next-line () (interactive) (join-line -1))
  57. (line-number-mode 1)
  58. (column-number-mode 1))
  59.  
  60. ;; Mouse wheel support
  61. (use-package mwheel
  62. :config
  63. (setq mouse-wheel-progressive-speed nil
  64. mouse-wheel-scroll-amount '(1 ((shift) . 1))
  65. mouse-wheel-follow-mouse t))
  66.  
  67. (use-package subword
  68. :diminish ""
  69. :config (global-subword-mode 1))
  70.  
  71. ;; Highlight parens and brackets
  72. (use-package paren
  73. :config
  74. (setq show-paren-delay 0)
  75. (show-paren-mode))
  76.  
  77. ;; ---------------------- Melpa packages -----------------------------
  78. (setq use-package-always-ensure t)
  79.  
  80.  
  81. ;; Colors the parenteses in pairs
  82. (use-package rainbow-delimiters
  83. :defer 1
  84. :config (add-hook 'prog-mode-hook 'rainbow-delimiters-mode))
  85.  
  86.  
  87. (use-package company
  88. :diminish ""
  89. :config (global-company-mode))
  90.  
  91. (use-package which-key
  92. :diminish ""
  93. :config
  94. (which-key-mode))
  95.  
  96.  
  97. ;; Highlight changed text after some commands
  98. (use-package volatile-highlights
  99. :diminish volatile-highlights-mode
  100. :config (volatile-highlights-mode t))
  101.  
  102.  
  103. (use-package smart-comment
  104. :bind ("M-;" . smart-comment))
  105.  
  106. ;; Realtime syntaks checking
  107. (use-package flycheck
  108. :defer t)
  109.  
  110. ;; Realtime spell-checking
  111. (use-package flyspell
  112. :defer t
  113. :config
  114. (setq ispell-program-name "aspell"
  115. ispell-dictionary "english"))
  116.  
  117. ;; Clean whitespace trailing on save
  118. (use-package whitespace-cleanup-mode
  119. :diminish whitespace-cleanup-mode
  120. :defer 1
  121. :config (global-whitespace-cleanup-mode 1))
  122.  
  123. ;; Move lines and regions up or down
  124. (use-package move-text
  125. :bind
  126. ("M-P" . move-text-up)
  127. ("M-N" . move-text-down))
  128.  
  129. (global-set-key (kbd "C-x C-b") 'ibuffer)
  130. (autoload 'ibuffer "ibuffer" "List buffers." t)
  131.  
  132.  
  133. ;; ---------------------- Language settings -----------------------------
  134.  
  135. (use-package org
  136. :mode ("\\.org\\'" . org-mode)
  137. :bind
  138. ("C-z o" . org-open-main-file)
  139. ("C-z a" . org-agenda)
  140. ("C-z c" . org-capture)
  141. :config
  142. (setq org-log-done t
  143. org-default-notes-file "~/organizer.org"
  144. org-refile-targets '((org-agenda-files . (:maxlevel . 6)))
  145. org-todo-keywords '((sequence "TODO" "INPROGRESS" "DONE"))
  146. org-todo-keyword-faces '(("INPROGRESS" . (:foreground "blue" :weight bold))))
  147. (defun org-open-main-file () (interactive) (find-file "~/organizer.org")))
  148.  
  149. (use-package scheme
  150. :ensure t
  151. :mode ("\\.scm\\'" . scheme-mode)
  152. :config (setq scheme-program-name "petite"))
  153.  
  154.  
  155. (require 'iso-transl)
  156.  
  157. (setq inhibit-startup-message t) ; dont show the GNU splash screen
  158. (transient-mark-mode t) ; show selection from mark
  159. (setq visible-bell 1) ; turn off bip warnings
  160. (show-paren-mode t) ; turn on highlight paren mode
  161. (fset 'yes-or-no-p 'y-or-n-p) ; use y and n for questions
  162. (global-font-lock-mode t) ; enable syntax highlighting
  163. (icomplete-mode 99) ; better buffer switching
  164.  
  165. (load-file "/home/alexander/scheme-setup.el")
  166. (custom-set-variables
  167. ;; custom-set-variables was added by Custom.
  168. ;; If you edit it by hand, you could mess it up, so be careful.
  169. ;; Your init file should contain only one such instance.
  170. ;; If there is more than one, they won't work right.
  171. '(background-color "#202020")
  172. '(background-mode dark)
  173. '(cursor-color "#cccccc")
  174. '(custom-enabled-themes (quote (sanityinc-tomorrow-eighties)))
  175. '(custom-safe-themes
  176. (quote
  177. ("b79104a19e95f10698badb711bd4ab25565af3ffcf18fa7d3c7db4de7d759ac8" "7dd0db710296c4cec57c39068bfffa63861bf919fb6be1971012ca42346a417f" "c0dd5017b9f1928f1f337110c2da10a20f76da0a5b14bb1fec0f243c4eb224d4" "06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "82d2cac368ccdec2fcc7573f24c3f79654b78bf133096f9b40c20d97ec1d8016" "0c311fb22e6197daba9123f43da98f273d2bfaeeaeb653007ad1ee77f0003037" "c4465c56ee0cac519dd6ab6249c7fd5bb2c7f7f78ba2875d28a50d3c20a59473" "705f3f6154b4e8fac069849507fd8b660ece013b64a0a31846624ca18d6cf5e1" default)))
  178. '(fci-rule-color "#383838")
  179. '(foreground-color "#cccccc")
  180. '(nrepl-message-colors
  181. (quote
  182. ("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3")))
  183. '(rainbow-identifiers-cie-l*a*b*-lightness 30)
  184. '(rainbow-identifiers-cie-l*a*b*-saturation 35)
  185. '(vc-annotate-background "#2B2B2B")
  186. '(vc-annotate-color-map
  187. (quote
  188. ((20 . "#BC8383")
  189. (40 . "#CC9393")
  190. (60 . "#DFAF8F")
  191. (80 . "#D0BF8F")
  192. (100 . "#E0CF9F")
  193. (120 . "#F0DFAF")
  194. (140 . "#5F7F5F")
  195. (160 . "#7F9F7F")
  196. (180 . "#8FB28F")
  197. (200 . "#9FC59F")
  198. (220 . "#AFD8AF")
  199. (240 . "#BFEBBF")
  200. (260 . "#93E0E3")
  201. (280 . "#6CA0A3")
  202. (300 . "#7CB8BB")
  203. (320 . "#8CD0D3")
  204. (340 . "#94BFF3")
  205. (360 . "#DC8CC3"))))
  206. '(vc-annotate-very-old-color "#DC8CC3"))
  207. (custom-set-faces
  208. ;; custom-set-faces was added by Custom.
  209. ;; If you edit it by hand, you could mess it up, so be careful.
  210. ;; Your init file should contain only one such instance.
  211. ;; If there is more than one, they won't work right.
  212. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement