Clean up settings
This commit is contained in:
parent
81747459b9
commit
e792492fb9
4 changed files with 23 additions and 50 deletions
5
bundle/calendar-settings.el
Normal file
5
bundle/calendar-settings.el
Normal file
|
@ -0,0 +1,5 @@
|
|||
(setq view-diary-entries-initially t
|
||||
mark-diary-entries-in-calendar t
|
||||
number-of-diary-entries 7)
|
||||
|
||||
(provide 'calendar-settings)
|
|
@ -1,24 +1,18 @@
|
|||
(setq *small-font* "Iosevka Term-11")
|
||||
(setq *big-font* "Iosevka Term-14")
|
||||
(setq echo-keystrokes 0.02)
|
||||
|
||||
(global-font-lock-mode)
|
||||
|
||||
(setq column-number-indicator-zero-based nil)
|
||||
(setq prettify-symbols-unprettify-at-point 'right-edge)
|
||||
(setq-default indicate-buffer-boundaries 'left)
|
||||
|
||||
(show-paren-mode)
|
||||
(setq show-paren-delay 0)
|
||||
(setq show-paren-style 'expression)
|
||||
|
||||
(global-hl-line-mode)
|
||||
|
||||
(setq whitespace-style '(tab-mark))
|
||||
(global-font-lock-mode)
|
||||
(show-paren-mode)
|
||||
(global-hl-line-mode)
|
||||
(global-whitespace-mode)
|
||||
|
||||
(size-indication-mode)
|
||||
|
||||
(column-number-mode)
|
||||
(setq column-number-indicator-zero-based nil)
|
||||
|
||||
(setq prettify-symbols-unprettify-at-point 'right-edge)
|
||||
(global-prettify-symbols-mode)
|
||||
|
||||
(provide 'display)
|
||||
|
|
7
bundle/hooks.el
Normal file
7
bundle/hooks.el
Normal file
|
@ -0,0 +1,7 @@
|
|||
(add-hook 'diary-display-hook 'fancy-diary-display)
|
||||
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
|
||||
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
|
||||
(add-hook 'markdown-mode-hook 'turn-on-font-lock)
|
||||
(add-hook 'python-mode-hook 'turn-on-font-lock)
|
||||
(add-hook 'org-mode-hook 'turn-on-font-lock)
|
||||
(provide 'hooks)
|
41
init.el
41
init.el
|
@ -34,11 +34,10 @@ There are two things you can do about this warning:
|
|||
(setq custom-file "~/.emacs.d/bundle/custom.el")
|
||||
(load custom-file :noerror)
|
||||
|
||||
(setq small-font "Iosevka Term-11")
|
||||
(setq big-font "Iosevka Term-14")
|
||||
|
||||
(require 'os)
|
||||
(require 'display)
|
||||
(require 'hooks)
|
||||
(require 'calendar-settings)
|
||||
|
||||
;; start a server, unless one is already running
|
||||
(when (require 'server nil t)
|
||||
|
@ -50,13 +49,6 @@ There are two things you can do about this warning:
|
|||
(set-keyboard-coding-system 'utf-8)
|
||||
(set-terminal-coding-system 'utf-8)
|
||||
|
||||
;; nuke trailing whitespace when writing to a file
|
||||
(add-hook 'write-file-hooks 'delete-trailing-whitespace)
|
||||
|
||||
(add-hook 'markdown-mode-hook 'turn-on-font-lock)
|
||||
(add-hook 'python-mode-hook 'turn-on-font-lock)
|
||||
|
||||
;; I got sick of typing "yes"
|
||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||
(with-current-buffer "*scratch*" (emacs-lock-mode 'kill))
|
||||
|
||||
|
@ -65,22 +57,9 @@ There are two things you can do about this warning:
|
|||
(interactive)
|
||||
(clipboard-kill-ring-save (point-min) (point-max)))
|
||||
|
||||
(defun format-whole-buffer ()
|
||||
"Copy entire buffer to clipboard"
|
||||
(interactive)
|
||||
(fill-paragraph (point-min) (point-max)))
|
||||
|
||||
(put 'upcase-region 'disabled nil)
|
||||
|
||||
(setq view-diary-entries-initially t
|
||||
mark-diary-entries-in-calendar t
|
||||
number-of-diary-entries 7)
|
||||
(add-hook 'diary-display-hook 'fancy-diary-display)
|
||||
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
|
||||
|
||||
|
||||
(put 'narrow-to-region 'disabled nil)
|
||||
(put 'narrow-to-page 'disabled nil)
|
||||
(put 'upcase-region 'disabled nil)
|
||||
|
||||
(defun duplicate-line()
|
||||
(interactive)
|
||||
|
@ -93,24 +72,12 @@ There are two things you can do about this warning:
|
|||
)
|
||||
;;(global-set-key (kbd "C-d") 'duplicate-line)
|
||||
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
||||
|
||||
;; slime
|
||||
(setq slime-contribs '(slime-fancy))
|
||||
|
||||
|
||||
|
||||
(require 'url)
|
||||
(defun webscrap-page-raw (url)
|
||||
(interactive)
|
||||
(let 'url-request-method "GET")
|
||||
(url-retrieve url
|
||||
(lambda (status) (switch-to-buffer-other-window (current-buffer))))
|
||||
)
|
||||
|
||||
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
||||
|
||||
;; ===================== Org-mode ====================== ;;
|
||||
(add-hook 'org-mode-hook 'turn-on-font-lock)
|
||||
(org-clock-persistence-insinuate)
|
||||
;; ==================== GLOBAL KEYS ==================== ;;
|
||||
(global-set-key "\C-cl" 'org-store-link)
|
||||
|
|
Loading…
Add table
Reference in a new issue