 (setq scroll-margin 5)
 (setq scroll-conservatively 10000)
 
-;; yascroll
-;; (global-yascroll-bar-mode 1)
-
-
 ;; optical stuff
 ;; Stop cursor blinking
 (blink-cursor-mode -1)


;; undo highlighting
;; highlight changes made by undo
(use-package volatile-highlights)
(volatile-highlights-mode t)


;; show keystrokes in progress
(setq echo-keystrokes 0.1)

(setq split-width-threshold 90)

;; show #colors in matching color
(use-package rainbow-mode
             :ensure t)
(defadvice rainbow-mode (after rainbow-mode-refresh activate)
  (font-lock-fontify-buffer))


;; highlight some whitespace
(use-package leerzeichen
  :commands (leerzeichen-mode))
(add-hook 'prog-mode-hook  'leerzeichen-mode)
(add-hook 'dired-mode-hook 'leerzeichen-mode)

;; parenthesis highlighting behavior
(use-package paren
  :config
  (setq blink-matching-paren-distance nil)
  (setq show-paren-style 'expression)
  (setq show-paren-delay 0.05) ; don't start highlighting when just scrolling past
  (show-paren-mode 1))

(defun toggle-line-wrap ()
  (interactive)
  (if truncate-lines
      (toggle-truncate-lines 1)
    (toggle-truncate-lines 0))
  (if visual-line-mode
      (visual-line-mode 0)
    (visual-line-mode 1)))

;; make regexpes a bit more readable by default
(defun fontify-glyph (item glyph)
