summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-11-19 00:36:56 -0500
committerKyle Meyer <kyle@kyleam.com>2016-11-19 00:36:56 -0500
commit8df84d4122bd492c300ff75b06f6fdbf086301ab (patch)
treefdc8c403796cef93de192c7fe90187a46350c8fd
parentf1260b634836519e98e8c0b4ee8a29ecb66dfec3 (diff)
downloademacs.d-8df84d4122bd492c300ff75b06f6fdbf086301ab.tar.gz
helm: Add below variants for buffers and files
-rw-r--r--init.el6
-rw-r--r--lisp/km-helm.el18
2 files changed, 23 insertions, 1 deletions
diff --git a/init.el b/init.el
index 2a91f78..e12f18a 100644
--- a/init.el
+++ b/init.el
@@ -1204,14 +1204,18 @@
:init
(after 'helm-files
(bind-keys :map helm-find-files-map
+ ("C-c b" . km/helm-find-file-below)
("C-c x" . km/helm-ff-org-open-file)
("C-c C-o" . km/helm-display-file)))
(after 'helm-locate
(bind-keys :map helm-generic-files-map
+ ("C-c b" . km/helm-find-file-below)
("C-c x" . km/helm-ff-org-open-file)
("C-c C-o" . km/helm-display-file)))
(after 'helm-buffers
- (define-key helm-buffer-map (kbd "C-c C-o") #'km/helm-display-buffer)))
+ (bind-keys :map helm-buffer-map
+ ("C-c b" . km/helm-display-buffer-below)
+ ("C-c C-o" . km/helm-display-buffer))))
(use-package helm-mode
:diminish helm-mode
diff --git a/lisp/km-helm.el b/lisp/km-helm.el
index 9be507a..b8d2dc0 100644
--- a/lisp/km-helm.el
+++ b/lisp/km-helm.el
@@ -44,5 +44,23 @@
(with-helm-alive-p
(helm-exit-and-execute-action #'org-open-file)))
+;;;###autoload
+(defun km/helm-display-buffer-below ()
+ (interactive)
+ (with-helm-alive-p
+ (helm-exit-and-execute-action
+ (lambda (b)
+ (display-buffer b '(display-buffer-below-selected))))))
+
+;;;###autoload
+(defun km/helm-find-file-below ()
+ (interactive)
+ (with-helm-alive-p
+ (helm-exit-and-execute-action
+ (lambda (f)
+ (select-window
+ (display-buffer (find-file-noselect f)
+ '(display-buffer-below-selected)))))))
+
(provide 'km-helm)
;;; km-helm.el ends here