Skip to content

Commit 02b1edf

Browse files
committed
feat: add docs for file tree inside file management section
1 parent 5bdb126 commit 02b1edf

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed

docs/05-file-management.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: File Management
3+
---
4+
5+
import React from 'react';
6+
import VideoPlayer from '@site/src/components/Video/player';
7+
8+
This section covers how **Phoenix Code Editor** lets you manage, organize, and navigate files and folders within your projects.
9+
10+
---
11+
12+
## File Tree
13+
14+
The **File Tree** appears in the sidebar and shows the complete folder structure of the open project.
15+
It lists all files and folders in a hierarchical view.
16+
17+
![File Tree](./images/fileManagement/file-tree.png "File Tree")
18+
19+
> All file and folder operations, such as creating, renaming, and deleting, is generally performed through the File Tree.
20+
21+
### File Tree Context Menu
22+
23+
When you right-click within the File Tree, a context menu appears which allows you to perform various operations.
24+
25+
- Right‑click a **file** → the action applies to that file.
26+
- Right‑click a **folder** → the action applies inside that folder (e.g., add file, create subfolder, delete contents).
27+
- Right‑click on **empty space** → the action applies to the project’s root directory.
28+
29+
![File Tree Context Menu](./images/fileManagement/file-tree-context-menu.png "File Tree Context Menu")
30+
> In this example, `index.html` is selected. Any action from the context menu will apply to that file.
31+
32+
The File Tree updates automatically, but if files or folders appear missing, use `Refresh File Tree` option in the context menu to manually reload it. This option forces a full refresh of the tree view.
33+
34+
You can also assign or update keyboard shortcuts for any File Tree action through the context menu.
35+
See the [Keyboard Shortcuts Guide](./Features/keyboard-shortcuts) for complete details.
36+
37+
---
38+
39+
### Sorting Files and Folders
40+
41+
By default, the File Tree sorts folders first (in ascending order), followed by files.
42+
43+
To sort folders and files together:
44+
1. Click the **arrows icon** at the top-right of the sidebar.
45+
2. In the dropdown, uncheck **Sort Folders First**.
46+
47+
![File Tree folders sort](./images/fileManagement/file-tree-sort-folders-option.png "File Tree folders sort")
48+
49+
Alternatively, you can control this behavior by updating the `sortDirectoriesFirst` property in the preferences file.
50+
See [Editing Preferences](./editing-text#editing-preferences) for details.
51+
52+
Now, files and folders are sorted together in one ascending list.
53+
![File tree sorted](./images/fileManagement/file-tree-sorted.png "File Tree sorted")
54+
> Notice how the `images` folder now appears in alphabetical order with other items.
66.6 KB
Loading
127 KB
Loading
42 KB
Loading
368 KB
Loading

0 commit comments

Comments
 (0)