Skip to content
Browse files

Use C-w to go back up a dir to better match normal usage of C-w

  • Loading branch information...
1 parent 7f8c1d6 commit 6bc9d58468e0f9f5f3f23f74fc65be4783af9372 @magnars committed
Showing with 8 additions and 4 deletions.
  1. +8 −4 setup-ido.el
View
12 setup-ido.el
@@ -8,10 +8,14 @@
ido-use-filename-at-point nil
ido-max-prospects 10)
-;; Use C-w to go back up a dir to better match normal usage of C-w
-;; - insert current file name with C-x C-w instead.
-(define-key ido-file-completion-map (kbd "C-w") 'ido-delete-backward-updir)
-(define-key ido-file-completion-map (kbd "C-x C-w") 'ido-copy-current-file-name)
+(add-hook
+ 'ido-setup-hook
+ #'(lambda ()
+
+ ;; Use C-w to go back up a dir to better match normal usage of C-w
+ ;; - insert current file name with C-x C-w instead.
+ (define-key ido-file-completion-map (kbd "C-w") 'ido-delete-backward-updir)
+ (define-key ido-file-completion-map (kbd "C-x C-w") 'ido-copy-current-file-name)))
;; Always rescan buffer for imenu
(set-default 'imenu-auto-rescan t)

0 comments on commit 6bc9d58

Please sign in to comment.
Something went wrong with that request. Please try again.