Add helm/ivy keybindings; remove unused helm fns

This commit is contained in:
Henrik Lissner 2016-10-03 12:11:50 +02:00
parent d2c6f0ca71
commit 630bdc76d5
2 changed files with 23 additions and 19 deletions

View file

@ -53,18 +53,6 @@ DIR specifies the default-directory from which ag is run."
(interactive "<a><!>")
(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

View file

@ -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! "<f9>" '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