   :ensure t
   :config (ws-butler-global-mode))
 
+(use-package ag
+  :ensure t
+  :ensure-system-package
+  (ag . silversearcher-ag)
+  :config
+  (setq ag-highlight-search t)
+  (setq ag-reuse-buffers 't)
+  )
+
 (use-package editorconfig
-  :ensure ws-butler
+  :ensure t
+  :after ws-butler
   :init
   (setq editorconfig-trim-whitespaces-mode
          'ws-butler-mode)
   :config
   (editorconfig-mode 1)
-  (add-to-list 'editorconfig-indentation-alist
-               '(f90-mode
-                 f90-associate-indent f90-continuation-indent
-                 f90-critical-indent f90-do-indent f90-if-indent
-                 f90-program-indent f90-type-indent))
   ;; Always use tabs for Makefiles
   (add-hook 'editorconfig-hack-properties-functions
 	    '(lambda (props)


;; Recent file menu/opening from mastering emacs
(require 'recentf)
;; get rid of `find-file-read-only' and replace it with something
;; more useful.
(global-set-key (kbd "C-x C-r") 'ido-recentf-open)
;; enable recent files mode.
(recentf-mode t)
; 100 files ought to be enough.
(setq recentf-max-saved-items 100)
(defun ido-recentf-open ()
  "Use `ido-completing-read' to \\[find-file] a recent file"
  (interactive)
  (if (find-file (ido-completing-read "Find recent file: " recentf-list))
      (message "Opening file...")
    (message "Aborting")))
;; http://www.masteringemacs.org/articles/2011/01/27/find-files-faster-recent-files-package/
;; Give IDO mode a shot
(setq ido-everywhere t)
(setq ido-max-directory-size 100000)
(ido-mode (quote both))
; Use the current window when visiting files and buffers with ido
(setq ido-default-file-method 'selected-window)
(setq ido-default-buffer-method 'selected-window)
(setq ido-enable-flex-matching t)
(ido-mode 1)
(setq ido-use-filename-at-point 'guess)
(setq ido-file-extensions-order '(".F90" ".f90" ".pbs" ".inp" ".sh" ".el" ".py" ".cmd" ".txt"))
(setq ido-create-new-buffer 'prompt)
;;(setq ido-ignore-extensions t)
;;http://www.masteringemacs.org/articles/2010/10/10/introduction-to-ido-mode/
;; Hippie expand customizations
(setq hippie-expand-try-functions-list
      '(try-expand-dabbrev-visible try-expand-dabbrev try-expand-all-abbrevs try-expand-dabbrev-from-kill try-expand-dabbrev-all-buffers try-complete-file-name-partially try-complete-file-name try-expand-list try-expand-line))


(global-set-key "\C-cm" 'rcompile)
(setq ediff-split-window-function 'split-window-horizontally)
(setq imenu-auto-rescan t)
(setq imenu-max-items 80)
(setq imenu-sort-function 'imenu--sort-by-name)
;; backups
(setq make-backup-files 'non-nil)
