   "]]" #'dired-subtree-down
   "gq" #'dired-do-query-replace-regexp
   "gr" #'revert-buffer
-  "go" #'noccur-dired)
+  "go" #'noccur-dired
+  "o"  #'dired-sort-toggle-or-edit)
+
+(evil-set-initial-state 'wdired-mode 'normal)
 
 (defun pjones:dired-copy-filename-as-kill (&optional path)
   "Copy file name or entire PATH."


;; A few extra key bindings:
(evil-leader/set-key-for-mode 'dired-mode
  "f f"   (pjones:dired-cwd-do 'find-file)
  "m G"   #'dired-do-chgrp
  "m / n" #'dired-filter-by-name

;; Settings for `dired-mode'.

;;; Code:

(require 'dired)
(require 'dired-filter)
(require 'dired-narrow)
(require 'dired-subtree)
(require 'dired-x)
(require 'evil)
(require 'evil-leader)
(require 'noccur)
(require 'wdired)

(eval-when-compile
  (load
   (concat
    (file-name-directory
