From 630bdc76d51cd1dd650be06d28543e3eea584721 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 3 Oct 2016 12:11:50 +0200 Subject: [PATCH] Add helm/ivy keybindings; remove unused helm fns --- core/defuns/defuns-helm.el | 12 ------------ private/my-bindings.el | 30 +++++++++++++++++++++++------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/core/defuns/defuns-helm.el b/core/defuns/defuns-helm.el index 26849e24d..d84d679aa 100644 --- a/core/defuns/defuns-helm.el +++ b/core/defuns/defuns-helm.el @@ -53,18 +53,6 @@ DIR specifies the default-directory from which ag is run." (interactive "") (if bang (helm-multi-swoop-all search) (helm-swoop :$query search))) -;;;###autoload -(defun doom/helm-find-in-emacsd () - (interactive) - (let ((default-directory doom-emacs-dir)) - (helm-projectile-find-file))) - -;;;###autoload -(defun doom/helm-find-in-dotfiles () - (interactive) - (let ((default-directory (expand-file-name ".dotfiles" "~"))) - (helm-projectile-find-file))) - ;;;###autoload (defun doom/helm-buffers-dwim (&optional all-p) "Displays open buffers in current project. If ALL-P, then show all open diff --git a/private/my-bindings.el b/private/my-bindings.el index 1e29ffdd3..a247795fc 100644 --- a/private/my-bindings.el +++ b/private/my-bindings.el @@ -7,15 +7,26 @@ `(lambda () (interactive) (let ((default-directory ,path)) (,@(if project-p + ;; '(helm-projectile-find-file) '(counsel-projectile-find-file) - '(call-interactively 'counsel-find-file)))))) + ;; '(call-interactively 'helm-find-files) + '(call-interactively 'counsel-find-file) + ))))) (map! "" 'what-face ;; Essential - "M-x" 'smex - "A-x" 'smex - "M-X" 'smex-major-mode-commands - "A-X" 'smex-major-mode-commands + (:when (featurep 'helm) + "M-x" 'helm-M-x + "A-x" 'helm-M-x + "M-X" 'helm-apropos + "A-X" 'helm-apropos + "M-o" 'helm-find-files) + (:when (featurep 'ivy) + "M-x" 'smex + "A-x" 'smex + "M-X" 'smex-major-mode-commands + "A-X" 'smex-major-mode-commands + "M-o" 'counsel-find-file) "M-;" 'eval-expression "A-;" 'eval-expression ;; Tools @@ -63,8 +74,7 @@ "A-SPC" 'just-one-space "M-a" 'mark-whole-buffer "M-c" 'evil-yank - "M-o" 'counsel-find-file - "M-q" 'kill-emacs + "M-q" 'save-buffers-kill-emacs "M-s" 'save-buffer "M-v" 'clipboard-yank "M-z" 'undo @@ -87,19 +97,25 @@ (:leader :nv "," 'doom/ivy-switch-project-buffer :nv "<" 'doom/ivy-switch-buffer + ;; :nv "," 'helm-buffers-list + ;; :nv "<" 'helm-mini :nv "." (@find-file-in default-directory) :nv "/" (@find-file-in (doom/project-root) t) :nv ">" 'projectile-find-file-in-known-projects :n ":" 'imenu-list-minor-mode + ;; :nv ";" 'helm-semantic-or-imenu :nv ";" 'counsel-imenu :v "=" 'align-regexp :nv "a" 'projectile-find-other-file + ;; :n "b" 'helm-bookmarks :n "b" 'counsel-bookmark :n "e" 'doom/flycheck-errors :n "k" 'doom:docs-lookup :nv "l" 'doom/nlinum-toggle + ;; :nv "m" 'helm-recentf :nv "m" 'counsel-recentf :nv "M" 'projectile-recentf + ;; :nv "p" 'helm-projectile-switch-project :nv "p" 'counsel-yank-pop :nv "P" 'counsel-projectile :n "R" 'doom/reset-theme