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))