twinnydotdev / twinny

The most no-nonsense, locally or API-hosted AI code completion plugin for Visual Studio Code - like GitHub Copilot but completely free and 100% private.
https://twinny.dev
MIT License
2.3k stars 126 forks source link

Keyboard short cut: accept part of the FIM suggestion #223

Open Fadelis98 opened 2 months ago

Fadelis98 commented 2 months ago

Is your feature request related to a problem? Please describe.

When the FIM give a long suggestion, usually I only want to accept some begining words. In github copilot, I can press ctrl → to accept only one word each time, just like I'm editing some existing line, and begin to type at any place. For multiline suggestions, I can press end to accpt the current line only as well.

Describe the solution you'd like add support for common cursor control shortcuts

rjmacarthy commented 2 months ago

Hey @Fadelis98 thanks for the report. Seems it never worked properly, edit, see below!

rjmacarthy commented 2 months ago

OK, I did some digging, this is somehow broken on Linux maybe Mac on later vscode versions. When I updated to insiders and tested it, it starts to work again. https://code.visualstudio.com/insiders/ when the new version is released it'll be fixed.

Fadelis98 commented 2 months ago

OK, I did some digging, this is somehow broken on Linux maybe Mac on later vscode versions. When I updated to insiders and tested it, it starts to work again. https://code.visualstudio.com/insiders/ when the new version is released it'll be fixed.

Thanks for your gread job, this project is amazing! It seems already work in the latest v3.11.31 version. Another problem I just noticed is that it now does not skip whitespace when using ctrl → to accept one word. This behavior is not expected and not elegent enough because it will regenerate the fim suggestion after accepting the whitespace. It will introduce extra waiting time and sometimes does not generate the same suggestion as before.

For more system information: System: Linux vscode: v1.88.1 twinny: v3.11.31

rjmacarthy commented 2 months ago

Please try latest insiders version of vscode. Many thanks.