 ;; Put custom definitions in another file and don't load it
 (setq custom-file (locate-user-emacs-file "custom.el"))
 ;; (load custom-file)
+
+;; dont jump screen on cursor scroll
+(setq scroll-conservatively 101
+      scroll-margin 5)
 
 (setq-default
  indent-tabs-mode nil ; tabs are evil

  :bind ("C-x o" . ace-window))

(use-package uniquify
  ;; ensure t breaks uniquify, for some reason
  :ensure nil
  :config
  (progn
    (setq uniquify-buffer-name-style 'forward)))

(use-package evil
  :demand
  :init
  (setq evil-want-C-u-scroll t
        evil-want-keybinding nil ; needed by evil-collection
        evil-undo-system 'undo-fu)
  (add-hook 'git-commit-mode-hook #'evil-insert-state)
  :config
  (evil-set-initial-state 'project-explorer-mode 'emacs)
  (evil-set-initial-state 'term-mode 'emacs)
  ;; make * and # behave like vim: include _ and - in search
  (setq-default evil-symbol-word-search t)
  (evil-mode 1)

  ;; fix "gf" to not prompt
  (defun my-find-file-at-point ()
    (interactive)
    (require 'ffap)
    (let* ((guess (ffap-guesser))
           (filename (expand-file-name guess)))
      (find-file filename)))
  (evil-add-command-properties #'my-find-file-at-point :jump t)
  (evil-define-key nil evil-normal-state-map "gf" 'my-find-file-at-point))

(use-package evil-collection
  :demand
