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 340
  • Win 164
  • Mac 122
  • Linux 54
May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26
Windows 1 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 0 0 0 0 0 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 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 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 1 0 0 0 0 0 0 0 0 0 0 0 0 1 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.