emacs.d/init.el

56 lines
1.6 KiB
EmacsLisp
Raw Normal View History

2020-07-26 14:36:43 +02:00
(add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle/"))
(load "bundle--server")
(load "bundle--package")
(load "bundle--customfile")
(load "bundle--keys")
(load "bundle--coding")
2020-07-13 16:45:12 +02:00
;; (load-theme 'nord t)
(require 'color-theme-sanityinc-tomorrow)
2020-06-22 15:23:52 +02:00
(defalias 'yes-or-no-p 'y-or-n-p)
(org-clock-persistence-insinuate)
2020-05-15 16:07:46 +02:00
;; HOOKS
2020-06-22 15:23:52 +02:00
(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)
2020-07-17 08:39:06 +02:00
(defun me/org-mode ()
"My custom configuration for 'org-mode'."
(olivetti-mode)
(olivetti-set-width 82))
2020-07-31 13:33:41 +02:00
(add-hook 'nov-mode-hook 'me/org-mode)
2020-06-22 15:23:52 +02:00
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(add-hook 'rst-mode-hook 'turn-on-orgstruct)
(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index)
(add-to-list 'auto-mode-alist '("\\.tmpl\\'" . web-mode))
2020-05-15 16:07:46 +02:00
2020-07-26 14:36:43 +02:00
(load "bundle--calendar")
2019-11-26 16:46:24 +01:00
2020-06-22 15:23:52 +02:00
(put 'narrow-to-region 'disabled nil)
2020-06-23 19:30:37 +02:00
(put 'narrow-to-page 'disabled nil)
2020-06-23 10:27:38 +02:00
2020-07-26 14:36:43 +02:00
(load "bundle--mk")
(defun me/split-windows-horizontal ()
2020-08-12 11:18:36 +02:00
"Split windows horizontal by equal width."
(interactive)
2020-08-05 09:09:49 +02:00
(setq count-windows 3)
(delete-other-windows)
(let ((width (/ (window-total-width) count-windows)))
(setq count 0)
(while (< count (1- count-windows))
(split-window-right (- 0 width))
(setq count (1+ count)))))
2020-08-10 09:56:52 +02:00
(me/split-windows-horizontal)
2020-08-12 11:18:36 +02:00
(defun me/split-windows-vertical ()
"Split windows vertical by equal width."
(interactive)
(setq count-windows 3)
(delete-other-windows)
(let ((height (/ (window-total-height) count-windows)))
(setq count 0)
(while (< count (1- count-windows))
(split-window-below (- 0 height))
(setq count (1+ count)))))