Skip to content

Instantly share code, notes, and snippets.

@tam17aki
Created August 28, 2013 14:35
Show Gist options
  • Save tam17aki/6366706 to your computer and use it in GitHub Desktop.
Save tam17aki/6366706 to your computer and use it in GitHub Desktop.
(defun ibuffer-ido-find-file ()
"Like `ido-find-file', but default to the directory of the buffer at point."
(interactive)
(let ((default-directory
(let ((buf (ibuffer-current-buffer)))
(if (buffer-live-p buf)
(with-current-buffer buf
default-directory)
default-directory))))
(ido-find-file-in-dir default-directory)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment