Skip to content

Commit 07fd72f

Browse files
authored
Merge pull request #5456 from NGC13009/patch-2
Update autocomplete.mdx
2 parents 6ad384d + ec58d64 commit 07fd72f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/docs/customize/deep-dives/autocomplete.mdx

+7-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,13 @@ Yes, in VS Code, if you don't want to be shown suggestions automatically you can
134134

135135
### Is there a shortcut to accept one line at a time?
136136

137-
This is a built-in feature of VS Code, but it's just a bit hidden. See this great [StackOverflow answer](https://stackoverflow.com/questions/72228174/accept-line-by-line-from-autocompletion/78001122#78001122) for more details.
137+
This is a built-in feature of VS Code, but it's just a bit hidden. Follow these settings to reassign the keyboard shortcuts in VS Code:
138+
1. Press `Ctrl+Shift+P`, type the command: `Preferences: Open Keyboard Shortcuts`, and enter the keyboard shortcuts settings page.
139+
2. Search for `editor.action.inlineSuggest.acceptNextLine`.
140+
3. Set the key binding to `Tab`.
141+
4. Set the trigger condition (when) to `inlineSuggestionVisible && !editorReadonly`.
142+
This will make multi-line completion (including continue and from VS Code built-in or other plugin snippets) still work, and you will see multi-line completion. However, Tab will only fill in one line at a time. Any unnecessary code can be canceled with `Esc`.
143+
If you need to apply all the code, just press `Tab` multiple times.
138144

139145
### How to turn off autocomplete
140146

0 commit comments

Comments
 (0)