Sunday, June 18, 2006

improvement for dired-single

改进一下dired-single返回上层目录的功能

Improvement for going back to parent directory (using dired-single).

在.emacs里改一下dired-single设置代码:
(require 'dired-single)
(define-key dired-mode-map (kbd "RET") 'joc-dired-single-buffer)
(define-key dired-mode-map (kbd ".")
;; type . to go back to the parent directory
'(lambda ()
(interactive)
(let ((current-dir (dired-current-directory)))
(joc-dired-single-buffer "..")
(dired-goto-file current-dir))))

按.返回上层目录,光标停留在原先的目录名上。
del.icio.us Tags:

No comments: