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
This iteration we have made Copilot inline completions (ghost text) compatible with multiple cursor positions. Previously the inline completions were visible and applied only at the primary cursor position. Generally speaking, the inline completions that are inserted at the secondary cursors correspond to the inline completions to the right of the primary cursor. This means that if there are inline completions or code/text to the left of the primary cursor, this is not inserted at the secondary cursor positions.‡
To test, please follow the following steps:
Install and enable the Copilot extension. Enable the setting github.copilot.editor.enableAutoCompletions.
Open a file and place multiple cursors at different positions
Write some code/text until you see ghost text appear
Verify that the ghost text appears at all cursor positions
Click on the Tab key. Verify that the whole suggestion is accepted and inserted as expected into the editor.
Repeat steps 3 and 4. Click on cmd+arrow (if on Mac) or ctrl+arrow (if on Windows). Verify that you partially accept the inline completion at all cursor positions.
Repeat steps 1 to 6 so that the cursor positions are not on the same column index. In the image below for example the primary cursor is located after for ( on line 22 and the secondary cursor is located after for on line 20. Verify that the inline completions are displayed and inserted correctly given the point ‡ above.
Hi roblourens yes so this is something we have not yet developed. As you correctly mentioned the toolbar only appears at the primary cursor location, but we will aim to make it appear at the others.
Activity
[-]Test: Multi-cursor inline completions[/-][+]Test: multi-cursor inline completions[/+]roblourens commentedon Feb 20, 2024
Is it expected that I can only get that completion toolbar to show up on the completion for the primary cursor location?
aiday-mar commentedon Feb 20, 2024
Hi roblourens yes so this is something we have not yet developed. As you correctly mentioned the toolbar only appears at the primary cursor location, but we will aim to make it appear at the others.
andreamah commentedon Feb 21, 2024
Worked great for me, good work! 👍