如何更改emacs用作文件/文件夹指示符的图像

时间:2012-12-20 12:21:52

标签: emacs elisp

我想更改Emacs用于指示文件夹和文件的图标(在dirtree中)。有关示例,请参见下图:

Example of how I want the icons to look http://cezar.halmagean.ro/snaps/dirtree.png

2 个答案:

答案 0 :(得分:2)

虽然我看不到您引用的图像,但是使用ASCII而不是文件夹图标 - 打开dirtree.el并将'folder'替换为'ascii'

(define-derived-mode dirtree-mode tree-mode "Dir-Tree"
  "A mode to display tree of directory"
  (tree-widget-set-theme "folder"))
像这样:

(define-derived-mode dirtree-mode tree-mode "Dir-Tree"
  "A mode to display tree of directory"
  (tree-widget-set-theme "ascii"))

另请参阅:http://emhacks.sourceforge.net/tw-shots.html

答案 1 :(得分:0)

您可以自定义tree-widget-theme或摆弄一些tree-widget-themes-*变量,也可以为它创建自己的主题(它的主题只是一个包含文件的目录,如" open.png"," leaf.png",...