fourier / ztree

Directory tree comparison mode for Emacs
http://www.emacswiki.org/emacs/ZtreeDiff
GNU General Public License v3.0
239 stars 21 forks source link

Feature request: number of visible files #54

Closed rchar01 closed 6 years ago

rchar01 commented 6 years ago

I think that it would be a good feature to have an option (turn on/off in init file or maybe with shortcut) to show a number of visible files next to directory in ztree-dir, with separate face (e.g. shadow face). e.g.

[-] .emacs.d [3]
 |--[+] auto-save-list [4]

and with show filtered files:

[-] .emacs.d [3]
 |--[+] .trash [11]
 |--[+] auto-save-list [4]

What do you think about that?

fourier commented 6 years ago

Should this number include directories as well, or just a flat number of entries in a directory? Will it be useful in ztree-diff mode?

fourier commented 6 years ago

I've implemented this feature in the corresponding commit. It always show total number of entries(even hidden ones), otherwise it is confusing.

rchar01 commented 6 years ago

Thanks for the counting feature. Is there a way to bind this variable to on/off shortcut (e.g /)?

fourier commented 6 years ago

Bind this function

(defun ztree-toggle-show-number-of-children ()
  (interactive)
  (setf ztree-show-number-of-children (not ztree-show-number-of-children))
  (ztree-refresh-buffer))

to some key.