From 3f27ac4fcb9f3b7084e40620f44c7888b3a5a9bb Mon Sep 17 00:00:00 2001 From: Kashish Sharma Date: Wed, 28 Sep 2016 17:15:17 +0530 Subject: [PATCH] Tweak dired keybinds (W, C-w) --- contrapunctus/cp-fm.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrapunctus/cp-fm.el b/contrapunctus/cp-fm.el index d0b0751..bb8909b 100644 --- a/contrapunctus/cp-fm.el +++ b/contrapunctus/cp-fm.el @@ -13,9 +13,13 @@ "-Acl --group-directories-first --time-style=long-iso" ) (require 'launch) - (add-hook 'dired 'turn-on-launch-mode) + (add-hook 'dired-mode-hook 'turn-on-launch-mode) (define-key dired-mode-map (kbd "C-j") 'launch-files-dired) - (global-set-key (kbd "s-l") 'launch-file)) + (global-set-key (kbd "s-l") 'launch-file) + (define-key dired-mode-map (kbd "W") 'wdired-change-to-wdired-mode) + ;; after learning that this copies whole paths with null argument, + ;; this became a whole lot more useful + (define-key dired-mode-map (kbd "C-w") 'dired-copy-filename-as-kill)) (with-eval-after-load 'project-explorer (global-set-key (kbd " e") 'project-explorer-toggle))