55 lines
1.6 KiB
EmacsLisp
Executable file
55 lines
1.6 KiB
EmacsLisp
Executable file
(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")
|
|
;; (load-theme 'nord t)
|
|
(require 'color-theme-sanityinc-tomorrow)
|
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
(org-clock-persistence-insinuate)
|
|
|
|
;; HOOKS
|
|
(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)
|
|
(defun me/org-mode ()
|
|
"My custom configuration for 'org-mode'."
|
|
(olivetti-mode)
|
|
(olivetti-set-width 82))
|
|
(add-hook 'nov-mode-hook 'me/org-mode)
|
|
(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))
|
|
|
|
(load "bundle--calendar")
|
|
|
|
(put 'narrow-to-region 'disabled nil)
|
|
(put 'narrow-to-page 'disabled nil)
|
|
|
|
(load "bundle--mk")
|
|
|
|
(defun me/split-windows-horizontal ()
|
|
"Split windows horizontal by equal width."
|
|
(interactive)
|
|
(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)))))
|
|
|
|
(me/split-windows-horizontal)
|
|
|
|
(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)))))
|