 
 (defsubst +doom-modeline--evil-substitute ()
   "Show number of :s matches in real time."
-  (when (and (evil-ex-p) (or (evil-ex-hl-active-p 'evil-ex-substitute)
+  (when (and (featurep 'evil)
+             (evil-ex-p) (or (evil-ex-hl-active-p 'evil-ex-substitute)
                              (evil-ex-hl-active-p 'evil-ex-global-match)
                              (evil-ex-hl-active-p 'evil-ex-buffer-match)))
     (propertize

  "Displays the buffer's full path relative to the project root (includes the
project root). Excludes the file basename. See `doom-buffer-name' for that."
  (if buffer-file-name
    (let* ((default-directory (f-dirname buffer-file-name))
           (buffer-path (f-relative buffer-file-name (doom-project-root)))
           (max-length (truncate (* (window-body-width) 0.4))))
      (when (and buffer-path (not (equal buffer-path ".")))
        (if (> (length buffer-path) max-length)


(@def-modeline-segment matches
  "TODO"
  (or (concat (+doom-modeline--macro-recording)
              (+doom-modeline--anzu)
              (+doom-modeline--evil-substitute)
              (+doom-modeline--iedit))
      " %I "))

(@def-modeline-segment media-info
