               ("\\" . mc/vertical-align-with-space)
               ("#" . mc/insert-numbers) ; use num prefix to set the starting number
               ("^" . mc/edit-beginnings-of-lines)
-              ("$" . mc/edit-ends-of-lines)))
+              ("$" . mc/edit-ends-of-lines))
+  :config
+  ;; MC-friendly packages.
+  (use-package phi-search :ensure t)
+  (use-package phi-rectangle :ensure t)
+  (use-package phi-search-mc :ensure t
+    :config
+    (phi-search-mc/setup-keys)))
 
 ;; From https://github.com/daschwa/emacs.d
 (defadvice kill-ring-save (before slick-copy activate compile)

;;;; Navigation END

;;;; Helm START

(use-package helm-ag
  :ensure t

            (isearch-repeat-forward)))
      ad-do-it)))

;; From http://endlessparentheses.com/emacs-narrow-or-widen-dwim.html
(defun ar/narrow-or-widen-dwim (p)
  "Widen if buffer is narrowed, narrow-dwim otherwise.
Dwim means: region, org-src-block, org-subtree, or defun,
whichever applies first. Narrowing to org-src-block actually
calls `org-edit-src-code'.

With prefix P, don't widen, just narrow even if buffer is
already narrowed."
  (interactive "P")
  (declare (interactive-only))
  (cond ((and (buffer-narrowed-p) (not p)) (widen))
        ((region-active-p)
         (narrow-to-region (region-beginning) (region-end)))
        ((derived-mode-p 'org-mode)
         ;; `org-edit-src-code' is not a real narrowing
         ;; command. Remove this first conditional if you
         ;; don't want it.
         (cond ((ignore-errors (org-edit-src-code))
                (delete-other-windows))
               ((ignore-errors (org-narrow-to-block) t))
               (t (org-narrow-to-subtree))))
        ((derived-mode-p 'latex-mode)
         (LaTeX-narrow-to-environment))
        (t (narrow-to-defun))))

(bind-key "C-x n n" #'ar/narrow-or-widen-dwim)

(use-package swiper
  :ensure t
  :bind ("M-i" . swiper))
