            (setq-default rg-command-line-flags '("--sort path")))
   :bind (:map wh-keymap
               ;; Search
-              ("s d" . rg-dwim)
-
-              ;; Search specific
-              ("s s" . rg)))
+              ("s d" . rg-dwim)))
   
 (use-package ace-window
   :ensure t

  (org-journal-file-type 'monthly)
  (org-journal-carryover-items "/!"))

(use-package smex
  :ensure t
  :config (smex-initialize))

(use-package ivy
  ;; Interactive interface completion
  :ensure t
  :diminish ivy-mode
  :init (progn
          (setq ivy-use-virtual-buffers t)
          (setq ivy-count-format "(%d/%d) ")
          (setq ivy-sort-file-function 'string-lessp)
          (setq ivy-extra-directories nil)
          (setq magit-completing-read-function 'ivy-completing-read)
          (setq ivy-display-style 'fancy)
          (ivy-mode 1))
  :bind (("C-c C-r" . ivy-resume)))

(use-package counsel
  :ensure t
  :init  (progn
           (defun counsel-env-res (res path)
             (let ((apath (abbreviate-file-name path)))
               (list (car res)
                     (if (file-accessible-directory-p path)
                         (file-name-as-directory apath)
                       apath))))

           (defun counsel-env ()
             (delq nil
                   (mapcar
                    (lambda (s)
                      (let* ((res (split-string s "=" t))
                             (path (cadr res)))
                        (when (stringp path)
                          (cond ((file-exists-p path)
                                 (counsel-env-res res path))
                                ((file-exists-p (expand-file-name path ivy--directory))
                                 (counsel-env-res
                                  res (expand-file-name path ivy--directory)))
                                (t nil)))))
                    process-environment)))

           (defun counsel-expand-env ()
             (interactive)
             (if (equal ivy-text "")
                 (progn
                   (let ((enable-recursive-minibuffers t)
                         (history (symbol-value (ivy-state-history ivy-last)))
                         (old-last ivy-last)
                         (ivy-recursive-restore nil))
                     (ivy-read "Env: " (counsel-env)
                               :action (lambda (x)
                                         (ivy--reset-state (setq ivy-last old-last))
                                         (setq ivy--directory "")
                                         (delete-minibuffer-contents)
                                         (insert (cadr x))))))
               (insert "$")))
           )
  :bind(("M-x" . counsel-M-x)
        ("C-x C-f" . counsel-find-file)
        ("C-x b" . counsel-switch-buffer)
        ("C-x 4 b" . counsel-switch-buffer-other-window)

        :map counsel-find-file-map
        ("$" . counsel-expand-env)
        
        :map wh-keymap
        ("h f" . counsel-describe-function)
        ("h v" . counsel-describe-variable)
        ("h l" . counsel-find-library)
        ("h i" . counsel-info-lookup-symbol)
        ("h u" . counsel-unicode-char)
        ("y" . counsel-yank-pop)))

(use-package swiper
  :ensure t
  :bind (("C-s" . swiper-isearch)
         ("C-r" . swiper-isearch-backward)))

(use-package multiple-cursors
  ;; Multiple Cursors for Emacs.

  :init
  :config (electric-pair-mode))

(use-package simple
  :straight f
  :diminish visual-line-mode
