]> code.delx.au - gnu-emacs-elpa/blob - packages/ztree/README.md
Added ztree package
[gnu-emacs-elpa] / packages / ztree / README.md
1 ztree
2 =====
3
4 Ztree is a project dedicated to implementation of several text-tree applications inside Emacs. It consists of 2 subprojects: **ztree-diff** and **ztree-dir**(the basis of **ztree-diff**). Available in **GNU ELPA** and **MELPA**.
5
6 ztree-diff
7 ==========
8 **ztree-diff** is a directory-diff tool for Emacs inspired by commercial tools like Beyond Compare or Araxis Merge. It supports showing the difference between two directories; calling **Ediff** for not matching files, copying between directories, deleting file/directories, hiding/showing equal files/directories.
9
10 The comparison itself performed with the external **GNU diff** tool, so make sure to have one in the executable path. Verified on OSX and Linux.
11
12 If one wants to have a stand-alone application, consider the (WIP)[zdircmp](https://github.com/fourier/zdircmp) project based on **ztree-diff**.
13
14 Add the following to your .emacs file:
15
16 ```scheme
17 (push (substitute-in-file-name "path-to-ztree-directory") load-path)
18 (require 'ztree-diff)
19 ```
20
21 Call the `ztree-diff` interactive function:
22
23 ```
24 M-x ztree-diff
25 ```
26 Then you need to specify the left and right directories to compare.
27
28 ###Hotkeys supported
29 The basic hotkeys are the same as in the **ztree-dir**. Additionally:
30 * `RET` on different files starts the **Ediff** (or open file if one absent or the same)
31 * `Space` show the simple diff window for the current file instead of **Ediff** (or view file if one absent or the same)
32 * `TAB` to fast switch between panels
33 * `h` key to toggle show/hide identical files/directories
34 * `C` key to copy current file or directory to the left or right panel
35 * `D` key to delete current file or directory
36 * `v` key to quick view the current file
37 * `r` initiates the rescan/refresh of current file or subdirectory
38 * `F5` forces the full rescan.
39
40 Screenshots:
41
42 ![ztreediff emacsx11](https://github.com/fourier/ztree/raw/screenshots/screenshots/emacs_diff_xterm.png "Emacs in xterm with ztree-diff")
43
44 ![ztreediff-diff emacsx11](https://github.com/fourier/ztree/raw/screenshots/screenshots/emacs_diff_simplediff_xterm.png "Emacs in xterm with ztree-diff and simple diff")
45
46
47 ztree-dir
48 ---------
49 **ztree-dir** is a simple text-mode directory tree for Emacs. See screenshots below for the GUI and the terminal versions of the **ztree-dir**.
50
51 As above Add the following to your .emacs file:
52
53 ```scheme
54 (push (substitute-in-file-name "path-to-ztree-directory") load-path)
55 (require 'ztree-dir)
56 ```
57
58 Call the `ztree-dir` interactive function:
59
60 ```
61 M-x ztree-dir
62 ```
63
64 * Open/close directories with double-click, `RET` or `Space` keys.
65 * To jump to the parent directory, hit the `Backspace` key.
66 * To toggle open/closed state of the subtree of the current directory, hit the `x` key.
67
68
69 ![ztree emacsapp](https://github.com/fourier/ztree/raw/screenshots/screenshots/emacs_app.png "Emacs App with ztree-dir")
70
71 ![ztree emacsx11](https://github.com/fourier/ztree/raw/screenshots/screenshots/emacs_xterm.png "Emacs in xterm with ztree-dir")
72