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
Copy file name to clipboardExpand all lines: docs/modes.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ features of a mode depends on its developers:
34
34
35
35
We provide auto format and auto indent options separately, you can run these options to clean your files with modes'
36
36
power. You can use these features from command palette, menus, or with shortcuts; These features are available in
37
-
`Edit > Indention > Auto Indent` and `Format > Auto Format`, to see shortcuts, type `Auto Indent` or `Auto Format`
37
+
`Format > Indentation > Auto Indent` and `Format > Auto Format`, to see shortcuts, type `Auto Indent` or `Auto Format`
38
38
in command palette.
39
39
40
40
-**Initialization Lifecycle**
@@ -63,6 +63,18 @@ features of a mode depends on its developers:
63
63
problems in **Problems Panel** in bottom of editor, in this panel all error and warnings provided by mode will show
64
64
, and you can navigate between them by clicking on an item.
65
65
66
+
-**Indentation Settings**_optional_
67
+
68
+
After release of TFM API v2.2 (Text Forge v0.2), modes can provide indentation settings, so you can use multiple modes and be
69
+
sure about automatic setting indentation options when you change mode. For example, in YAML indentation must be with spaces,
70
+
bug in GDScript tabs are recommended, so a YAML mode can provide 2 spaces as indentation and a GDScript mode can provide
71
+
single tab with 4 width as indentation and you haven't need to change indentation type and size each time you open a new file.
72
+
73
+
To customize this feature for each mode, you can use **Indentation Settings** menu in bottom right corner of editor
74
+
(a button with a text like `Tabs (4)`), you can open a file with target mode and then use this button to set custom settings,
75
+
Also you can use `Format > Indentation > Reset To Mode Indentation Settings` to restore original settings. If you want disable
76
+
this feature (and use editor's indentation settings for all files) you can enable `Format > Indentation > Lock Indentation Settings`.
77
+
66
78
!!! Note
67
79
68
80
A lot of above features were added in TFM API v2.0, you can read more about this API [here](mode_development.md#text-forge-mode-api).
@@ -81,8 +93,7 @@ features of a mode depends on its developers:
81
93
82
94
!!! Note
83
95
84
-
Auto Format and Auto Indent are triggerable actions, there is an **Auto Indention** toggleable feature in `Format`
85
-
menu that will change indention automatically when you create new line.
96
+
Auto Format and Auto Indent are triggerable actions, there is an **Auto Indent New Lines** toggleable feature in `Format > Indentation` menu that will change indentation automatically when you create new line.
0 commit comments