aboutsummaryrefslogtreecommitdiff
path: root/book
diff options
context:
space:
mode:
authorSkyler Hawthorne2022-10-08 22:14:49 +0000
committerMichael Davis2023-08-01 14:41:42 +0000
commit15e07d4db893aec7b9e117c1f88400a68ba98ae2 (patch)
treef3d78f1904c596af44e79d0f850c33c3f518f2fb /book
parent93acb538121cab36712f40f26fa287df93817de5 (diff)
feat: smart_tab
Implement `smart_tab`, which optionally makes the tab key run the `move_parent_node_start` command when the cursor has non- whitespace to its left.
Diffstat (limited to 'book')
-rw-r--r--book/src/configuration.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/book/src/configuration.md b/book/src/configuration.md
index da1d1bf6..4c152bf4 100644
--- a/book/src/configuration.md
+++ b/book/src/configuration.md
@@ -347,3 +347,11 @@ max-wrap = 25 # increase value to reduce forced mid-word wrapping
max-indent-retain = 0
wrap-indicator = "" # set wrap-indicator to "" to hide it
```
+
+### `[editor.smart-tab]` Section
+
+
+| Key | Description | Default |
+|------------|-------------|---------|
+| `enable` | If set to true, then when the cursor is in a position with non-whitespace to its left, instead of inserting a tab, it will run `move_parent_node_end`. If there is only whitespace to the left, then it inserts a tab as normal. With the default bindings, to explicitly insert a tab character, press Shift-tab. | `true` |
+| `supersede-menu` | Normally, when a menu is on screen, such as when auto complete is triggered, the tab key is bound to cycling through the items. This means when menus are on screen, one cannot use the tab key to trigger the `smart-tab` command. If this option is set to true, the `smart-tab` command always takes precedence, which means one cannot use the tab key to cycle through menu items. One of the other bindings must be used instead, such as arrow keys or `C-n`/`C-p`. | `false` |