Skip to content

Instantly share code, notes, and snippets.

@kiwanami
Created March 8, 2012 03:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiwanami/1998307 to your computer and use it in GitHub Desktop.
Save kiwanami/1998307 to your computer and use it in GitHub Desktop.
e2wm plugin for direx file list
;;; direx plugin
(require 'direx)
(require 'direx-project)
(setq direx:leaf-icon " "
direx:open-icon ""
direx:closed-icon "")
(defun e2wm:def-plugin-direx (frame wm winfo)
(let* ((buf (e2wm:history-get-main-buffer))
(dbuf (with-current-buffer buf
(or
(ignore-errors
(direx-project:jump-to-project-root-noselect))
(direx:find-directory-noselect
(or default-directory "."))))))
(with-current-buffer dbuf
(direx:item-expand direx:root-item))
(wlf:set-buffer wm (wlf:window-name winfo) dbuf)))
(e2wm:plugin-register 'direx
"DireX"
'e2wm:def-plugin-direx)
@kiwanami
Copy link
Author

kiwanami commented Mar 8, 2012

direx-project 使うように修正してみた

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment