Skip to content

Commit

Permalink
Make alt-l the default linux/windows binding for AcceptEditPredicti…
Browse files Browse the repository at this point in the history
…on (#24630)

Release Notes:

- N/A
  • Loading branch information
mgsloan authored Feb 11, 2025
1 parent 9e178f1 commit a1d4bd9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
10 changes: 8 additions & 2 deletions assets/keymaps/default-linux.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,22 @@
"tab": "editor::ComposeCompletion"
}
},
// Bindings for accepting edit predictions
//
// alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This is
// because alt-tab may not be available, as it is often used for window switching.
{
"context": "Editor && edit_prediction",
"bindings": {
"alt-enter": "editor::AcceptEditPrediction"
"alt-tab": "editor::AcceptEditPrediction",
"alt-l": "editor::AcceptEditPrediction"
}
},
{
"context": "Editor && edit_prediction && !edit_prediction_requires_modifier",
"bindings": {
"tab": "editor::AcceptEditPrediction"
"tab": "editor::AcceptEditPrediction",
"alt-l": "editor::AcceptEditPrediction"
}
},
{
Expand Down
11 changes: 11 additions & 0 deletions assets/keymaps/vim.json
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,18 @@
{
"context": "edit_prediction && !edit_prediction_requires_modifier",
"bindings": {
// This is identical to the binding in the base keymap, but the vim bindings above to
// "vim::Tab" shadow it, so it needs to be bound again.
"tab": "editor::AcceptEditPrediction"
}
},
{
"context": "os != macos && edit_prediction",
"bindings": {
// alt-l is provided as an alternative to tab/alt-tab. and will be displayed in the UI. This
// is because alt-tab may not be available, as it is often used for window switching on Linux
// and Windows.
"alt-l": "editor::AcceptEditPrediction"
}
}
]

0 comments on commit a1d4bd9

Please sign in to comment.