   ;;  "C-SPC" 'my/insert-two-spaces)
   )
 
-(general-def 'motion
+(general-def '(normal visual)
   ;; TODO: Figure out how to make this work.
   ;; "z RET" 'evil-scroll-line-to-top
   "\\" #'evil-switch-to-windows-last-buffer
-  "'"  #'evil-ex
-  "+"  #'text-scale-increase
-  "-"  #'text-scale-decrease
-  "H"  #'evil-first-non-blank
-  "L"  #'evil-end-of-line
-  "M"  #'evil-jump-item)
+  "'" #'evil-ex
+  ;; Mapping under non-prefix keys like q has to be done like this using
+  ;; `general-key-dispatch', see:
+  ;; https://github.com/noctuid/general.el#mapping-under-non-prefix-keys
+  "q" (general-key-dispatch 'evil-record-macro
+        "'" #'evil-command-window-ex)
+  "+" #'text-scale-increase
+  "-" #'text-scale-decrease
+  "H" #'evil-first-non-blank
+  "L" #'evil-end-of-line
+  "M" #'evil-jump-item)
 
 (general-def 'normal
   "Q" "@q"

  (defalias 'gsetq-default #'general-setq-default))

(general-create-definer general-my/leader
  :states 'normal
  :keymaps 'override
  :prefix "SPC")


   '(operators c-w prettify (atom-motions t) slurp/barf-cp escape))

  (general-def 'normal lispyville-mode-map
    "gc" #'lispyville-comment-or-uncomment
    "gy" #'lispyville-comment-and-clone-dwim
    "M-p" #'lispyville-wrap-round
    "M-[" #'lispyville-wrap-brackets
    "M-b" #'lispyville-wrap-braces
    "[" #'lispyville-previous-opening
    "]" #'lispyville-next-closing
    "{" #'lispyville-previous-closing
    "}" #'lispyville-next-opening
    "(" #'lispyville-backward-up-list
    ")" #'lispyville-up-list)

  ;; I still prefer having the paragraph motions for visual selection.
  (general-def 'visual lispyville-mode-map
