ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Render Tree

by cpeccei ST3

Sublime Text 3 plugin to render trees as text

Details

Installs

  • Total 353
  • Win 169
  • Mac 127
  • Linux 57
Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

RenderTree

Sublime Text 3 plugin to render tree structures as text. Uses the excellent anytree library.

Usage

Convert indented lines to tree

Type your tree structure using indented lines to represent the levels of the tree. You can use any sequence of whitespace to represent an indention level but it must be consistent across all lines. The indentation sequence is inferred from the second line of the tree, since by definition that must be indented. In the example below each level is indented by four spaces but you could just as easily use three spaces, or even a mixture of tabs and spaces, as long as the same string is used on all lines.

There must always be a single root node that has no identation (“Alpha” in the example below).

Alpha
    Bravo
    Charlie
        Delta
        Echo
    Foxtrot
    Golf
        Hotel
            India

Select all the lines containing your indented text then open the command pallete and choose “Render Tree: Convert indented lines to tree”. The tree structure will be inserted after your selected text.

Alpha
├── Bravo
├── Charlie
│   ├── Delta
│   └── Echo
├── Foxtrot
└── Golf
    └── Hotel
        └── India

Error messages and informational messages are printed to the Sublime Text console.

Install

  • Via Package Control: search for Render Tree.
  • Manual: clone this repo into your Sublime text 3 Packages folder.