 ;; (eval-after-load 'tramp-sh '(add-to-list 'tramp-actions-before-shell
 ;;              '(DSRC-tramp-prompt-regexp DSRC-tramp-action)))
 
-;; ;; Flymake
-;; (use-package flymake
-;; 	     :init
-;; 	     (setq flymake-run-in-place nil) ; nice default 4 tramp, .dir-locals.el overrides
-;; 	     :config
+;; Flymake
+(use-package flymake-cursor
+  :ensure flymake
+  :init
+  (setq flymake-run-in-place nil) ; nice default 4 tramp, .dir-locals.el overrides
+  :bind ("C-c n" . flymake-goto-next-error)
+  :bind ("C-c p" . flymake-goto-prev-error)
+  )
+
+
 (custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.

;; Install macOS specific helper packages
(use-package osx-clipboard
  :if (eq system-type 'darwin)
  
;; misc variables
(when window-system
  (set-frame-position (selected-frame) 0 0)
  (set-frame-size (selected-frame) 132 70))
(setq tab-width 4)          ; and 4 char wide for TAB
(setq indent-tabs-mode nil) ; And force use of spaces
(turn-on-font-lock)         ; same as syntax on in Vim

(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
;; ;; for homebrew install of magit... waaaaay faster than building with melpa etc.
;;(add-to-list 'load-path "/usr/local/share/emacs/site-lisp")
(setq delete-by-moving-to-trash t)
(setq exec-path (append '("/usr/local/bin")
                        exec-path))
(setq desktop-restore-eager 3)
(setq desktop-restore-forces-onscreen all)
(setq desktop-save ask-if-new)
(when window-system
  (desktop-save-mode 1)
  (tool-bar-mode -1))
(global-set-key "\C-cM" 'compile)
(global-set-key "\C-cm" 'rcompile)
(setq ediff-split-window-function split-window-vertically)


;; macOS stuff
(if (eq system-type 'darwin)
    (progn
      (setq TeX-view-program-selection '((output-pdf "PDF Viewer")))
      (setq TeX-view-program-list
	    '(("PDF Viewer" "/Applications/Skim.app/Contents/SharedSupport/displayline -b -g %n %o %b")))
      )
  )

;; put speedbar in same frame. CMD-s should toggle it...
(use-package sr-speedbar
