 ;;  => Custom set variables
 
 ;; ======== Package stuff ========
+
+;;; Code:
 
 (package-initialize)
 (require 'package)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;  => Package stuff
;;  => General setting

;; Follow symbolic links
(setq vc-follow-symlinks t)

(defun infer-indentation-style ()
  "If our source file uses tabs, we use tabs. If spaces spaces, and if neither, we use the current `indent-tabs-mode'"
  (interactive)
  (let ((space-count (how-many "^  " (point-min) (point-max)))
        (tab-count (how-many "^\t" (point-min) (point-max))))
    (if (> space-count tab-count) (setq-local indent-tabs-mode nil))
    (if (> tab-count space-count) (setq-local indent-tabs-mode t))))
(add-hook 'prog-mode-hook 'infer-indentation-style)

;; Keep 7 lines above and below cursor
(setq scroll-margin 7)
