You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: improve configuration names, docs and coding styles (#15)
* Whitespace formatting with TABs instead of spaces
* TSLint is now deprecated (use eslint-typescript instead)
* Reformat for easier debugging later on
* Update property names and descriptions
* Upgrade to at least version 1.50.0 of VSCode engine
* Rename property names
* Reorder properties
* Formalize README contents
* Simply write MIT instead
* Cleaned up strings and removed uncessary argument
* Changed to new property names
* Cleaned up strings
* Updated CHANGELOG.md
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,22 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
5
5
6
6
## [Unreleased]
7
7
8
+
## [1.2.5] - 2021-06-24
9
+
10
+
### Changed
11
+
12
+
- Reformatted files for easier readability (`Prettier` extension)
13
+
- Formalized [README.md](README.md) contents
14
+
- Changed property names (should not have spaces in them and was not descriptive to current extension)
15
+
16
+
### Fixed
17
+
18
+
- Some bug in VSCode `bin` installation when using yarn
19
+
- To fix, change stable releases link from `https://vscode-update.azurewebsites.net/api/releases/stable` to `https://update.code.visualstudio.com/api/releases/stable`
20
+
8
21
## [1.2.4] - 2020-09-11
9
22
10
-
- Remove the introduction (temporarily) for `indent` character usage in Readme since it is buggy (see [#13](https://github.com/aprilandjan/vscode-ascii-tree-generator/issues/13)).
23
+
- Remove the introduction (temporarily) for `indent` character usage in [README.md](README.md) since it is buggy (see [#13](https://github.com/aprilandjan/vscode-ascii-tree-generator/issues/13)).
A vscode extension to generate ascii tree of directories or format selected text to tree string.
7
+
Generate ASCII tree of directories or format selected text into its corresponding "tree string" representation.
8
8
9
9
## Usage
10
10
11
-
This extension provides convenient way to generate ascii tree string for directory in workspace explorer. Besides, you can select text in editor and format it to tree string easily.
11
+
Generate ASCII "tree strings" for any directory in the workspace explorer. Aside from that, you can also select pre-formatted text in the explorer and format it to its corresponding "tree string" easily.
12
12
13
-
### Format Text to Tree String
13
+
### Format Selected Text to Tree String
14
14
15
-
Write simple tree lines in certain syntax (see example below), select these lines, right-click on text and click `Format Text to Tree String` menu:
15
+
Using the `#` (octothorpe/hash) character, you can specify the depth of the current element. After writing a few lines (see example below), select the targetted pre-formatted lines, right-click on the highlighted text selection, and click `Format to Tree String` menu option. This will replace the selected, pre-formatted text, into its corresponding "tree string" representation.
16
16
17
17

18
18
19
-
The lines started with `hash(#)` characters can be used to represent the depth of the directory tree. For example:
19
+
For clarity, each line of your target tree structure should begin with at least a single `#` (octothorpe/hash) character. At most, each line can only have one more additional `#` than any line above it. This will ensure proper formatting. By placing multiple `#` symbols, it is possible to designate the depth of a certain element.
20
20
21
-
```
21
+
#### Demonstration
22
+
23
+
**Pre-Formatted Tree String**
24
+
25
+
```txt
22
26
# public
23
27
# dist
24
28
## index.d.ts
@@ -27,9 +31,9 @@ The lines started with `hash(#)` characters can be used to represent the depth o
27
31
## index.ts
28
32
```
29
33
30
-
They should be formatted to:
34
+
**Formatted Tree String**
31
35
32
-
```
36
+
```txt
33
37
.
34
38
├── public
35
39
├── dist
@@ -39,42 +43,51 @@ They should be formatted to:
39
43
└── index.ts
40
44
```
41
45
42
-
**Note**: In most cases, you can just simply undo the formatting operation using the vscode editor `undo` ability. The default shortcut is <kbd>cmd</kbd>+<kbd>Z</kbd>. Besides,
43
-
You can open the VS Code `Command Palette` and execute `Revert Tree String to Text` to revert tree string back to hash-style texts, in case that your undo history is lost for some reason.
46
+
#### Addendum
47
+
48
+
In cases where you would like to undo the formatting operation, simply use VSCode's editor `undo` option (`Edit`→`Undo`). You can optionally use the keybindings for undo as well (<kbd>⌘</kbd>+<kbd>Z</kbd> on Mac or <kbd>CTRL</kbd>+<kbd>Z</kbd> on Windows). However, this option will fail in cases where the `undo` operation is invalid (e.g. text inside downloaded materials).
49
+
50
+
In all cases, you can revert formatting tree strings back to their preformatted versions by selecting the formatted tree string, heading to the VSCode Command Pallete (<kbd>⌘</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd> on Mac or <kbd>CTRL</kbd>+<kbd>SHIFT</kbd>+<kbd>P</kbd> on Windows), and executing `Revert Tree String to Text`. As long as the matching lines up, this should provide back your intended pre-formatted tree string.
44
51
45
52
### Generate Tree String for Directory
46
53
47
-
Right-click on `Explorer`directories, click `Generate Tree String for Directory` menu:
54
+
In addition to being able to format pre-formatted tree strings, you may also generate tree strings for directories inside your current workspace (directories appearing in `Explorer`tab). To do so, right-click on any directory within the `Explorer` tab and select the `Generate Tree String for Directory` menu option. An example is shown below.
48
55
49
56

50
57
51
-
**Note**: This process of walking through files is asynchronous. So if you include some heavy-nested folders, `node_modules` for example, the result will be slow to show.
58
+
#### Addendum
59
+
60
+
The walking process through files is performed asynchronously. Therefore, selecting heavily-nested folders (e.g. `node_modules`) will directly affect performance speed.
52
61
53
62
## Configuration
54
63
55
-
Each character of the tree can be defined by its ASCII code (or UTF character code in general). The theoretical range for character codes is 0 to 65535. However, not every code will lead to a printable character and may cause formatting problems.
56
-
The available parameters are:
64
+
Each tree string character can be defined by its ASCII code representation (UTF character code, more generally). As such, the theorectical range for character codes is `0` to `65535` (two bytes). However, and important to note, is that not every character code is printable and/or may cause formatting issues.
57
65
58
-
| Name | Default Char Code | Default Character | Description |
Commonly used configurations that you can manually enable by entering the values for each of the aforementioned property names above (perfom these changes inside a `settings.json` file).
Please feel free to submit any issues or bugs you find with the extension. More generally, please reach out if you have any questions on how to use the extension.
79
92
80
-
Please feel free to submit issues if you have any questions. Contribution is also welcomed :)
93
+
Finally, contribution or ideas are humbly welcomed so please check us out on GitHub :) !
0 commit comments