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 334
  • Win 163
  • Mac 119
  • Linux 52
Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14
Windows 0 0 0 0 0 0 0 0 0 0 0 2 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
Mac 0 0 1 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 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 0 0 0 1 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.