From fcef54d06a2a1927e9ab2d21dcd6876b83873f53 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 18 Oct 2016 23:52:11 +0200 Subject: emacs: improved bindings for helm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- emacs/init.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'emacs/init.el') diff --git a/emacs/init.el b/emacs/init.el index 6b8f87e..9328174 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -279,6 +279,16 @@ The user will end up in the *scratch* buffer." (add-hook 'helm-minibuffer-set-up-hook 'helm-hide-minibuffer-maybe) (setq helm-split-window-in-side-p t) + ; Preview files with tab + (define-key helm-map (kbd "") 'helm-execute-persistent-action) + + ; Show available options + (define-key helm-map (kbd "C-a") 'helm-select-action) + + ; Some vim-like bindings + (define-key helm-map (kbd "C-j") 'helm-next-line) + (define-key helm-map (kbd "C-k") 'helm-previous-line) + (use-package helm-ag :ensure t)) @@ -290,7 +300,7 @@ The user will end up in the *scratch* buffer." ;; Rising from the deep flames of Hell: my Evil configuration. ;; TODO: evil mode also in backtraces ;; TODO: evil mode also in documentation -;; TODO: evil mode also in helm's find-file +;; TODO: evil mode help (defun mssola-evil () "Configure evil mode." @@ -380,6 +390,7 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (setq evil-leader/in-all-states 1) (evil-leader/set-key "," 'back-to-indentation + "a" 'helm-ag-project-root "c" 'delete-window "k" 'kill-buffer-and-window "v" 'split-window-right -- cgit v1.2.3