(define-key map [(meta down)] 'ido-next-work-directory)
(define-key map [backspace] 'ido-delete-backward-updir)
(define-key map "\d" 'ido-delete-backward-updir)
- (define-key map [remap viper-backward-char] 'ido-delete-backward-updir)
- (define-key map [remap viper-del-backward-char-in-insert] 'ido-delete-backward-updir)
(define-key map [(meta backspace)] 'ido-delete-backward-word-updir)
(define-key map [(control backspace)] 'ido-up-directory)
(define-key map [(meta ?b)] 'ido-next-work-file)
)
(when (if (boundp 'viper-mode) viper-mode)
- (define-key map [remap viper-backward-char] 'ido-delete-backward-updir)
- (define-key map [remap viper-del-backward-char-in-insert] 'ido-delete-backward-updir)
- (define-key map [remap viper-delete-backward-word] 'ido-delete-backward-word-updir)
- (define-key map [remap viper-intercept-ESC-key] 'ignore))
+ (define-key map [remap viper-intercept-ESC-key] 'ignore)
+ (when (memq ido-cur-item '(file dir))
+ (define-key map [remap viper-backward-char] 'ido-delete-backward-updir)
+ (define-key map [remap viper-del-backward-char-in-insert] 'ido-delete-backward-updir)
+ (define-key map [remap viper-delete-backward-word] 'ido-delete-backward-word-updir)))
(setq ido-mode-map map)
(run-hooks 'ido-define-mode-map-hook)))