From da66ac312fb03a3fbb3b2a7e95debdcddb547403 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Tue, 9 Feb 2016 07:59:27 -0800 Subject: [PATCH] spacemacs-helm: Add `C-c C-e` to switch to wdired Fixes #3724 --- layers/+completion/spacemacs-helm/keybindings.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/layers/+completion/spacemacs-helm/keybindings.el b/layers/+completion/spacemacs-helm/keybindings.el index 1c9c76b69..5f48d2e52 100644 --- a/layers/+completion/spacemacs-helm/keybindings.el +++ b/layers/+completion/spacemacs-helm/keybindings.el @@ -27,3 +27,14 @@ Ensure that helm is required before calling FUNC." ;; search functions ----------------------------------------------------------- (spacemacs||set-helm-key "sww" helm-wikipedia-suggest) (spacemacs||set-helm-key "swg" helm-google-suggest) + +(defun spacemacs-helm//find-files-edit (candidate) + (dired (file-name-directory candidate)) + (dired-goto-file candidate) + (dired-toggle-read-only)) +(defun spacemacs-helm/find-files-edit () + "Exits helm, opens a dired buffer and immediately switches to editable mode." + (interactive) + (helm-exit-and-execute-action 'spacemacs-helm//find-files-edit)) +(with-eval-after-load 'helm + (define-key helm-find-files-map (kbd "C-c C-e") 'spacemacs-helm/find-files-edit))