Skip to content

Instantly share code, notes, and snippets.

@10sr
Created June 24, 2010 12:45
Show Gist options
  • Select an option

  • Save 10sr/451402 to your computer and use it in GitHub Desktop.

Select an option

Save 10sr/451402 to your computer and use it in GitHub Desktop.
diredでミニバッファに現在行の内容表示
(defun dired-print-current-dir-and-file ()
(message (concat default-directory
" "
(buffer-substring-no-properties
(point-at-bol) (point-at-eol)))))
(defadvice dired-next-line (after dired-next-line-print-directory activate)
"print current directory when go down line"
(dired-print-current-dir-and-file))
(defadvice dired-previous-line (after dired-previous-line-print-directory activate)
"print current directory when go up line"
(dired-print-current-dir-and-file))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment