void icon indicating copy to clipboard operation
void copied to clipboard

Add support for ctrl+k

Open andrewpareles opened this issue 1 year ago • 15 comments

When the user presses ctrl+k, an input box should appear inline with the code that they were selecting. This is somewhat difficult to do because the vscode extension API alone doesn't support it - it requires creating a new component in the IDE.

We think we can modify vscode's built-in "codelens" or "zone widget" components to build the input box to ctrl+K, but we are open to alternatives like taking code from the "diffEditor".

inline4

andrewpareles avatar Sep 17 '24 22:09 andrewpareles

Do everything Cursor does but OSS?

Guess you guys are on the right track

AllyourBaseBelongToUs avatar Sep 18 '24 14:09 AllyourBaseBelongToUs

We don’t plan on just copying Cursor :)

Inline edits are a pretty core feature that most AI extensions / editors support

andrewpareles avatar Sep 18 '24 17:09 andrewpareles

Working on it, should open a pr soon

sunmorgan avatar Sep 19 '24 15:09 sunmorgan

does commenting count as contribution ? can i put that on my resume ?

ben-localhost avatar Sep 21 '24 10:09 ben-localhost

This Feature is available on VSCode Insider Version, called 'editorInsets', you can test it by an extension which has add "enabledApiProposals": ["editorInsets"] to package.json,but the feature is not completed as no 'setHeight' is provided.

Here is a issue lasted 5 years long.... https://github.com/microsoft/vscode/issues/85682

imcheeseberg avatar Sep 25 '24 16:09 imcheeseberg

This Feature is available on VSCode Insider Version, called 'editorInsets', you can test it by an extension which has add "enabledApiProposals": ["editorInsets"] to package.json,but the feature is not completed as no 'setHeight' is provided.

Here is a issue lasted 5 years long.... microsoft/vscode#85682

Great insight - thanks for this!

andrewpareles avatar Sep 26 '24 00:09 andrewpareles

why does it show the error "command 'void.ctrl+k' not found" shen i press the "ctrl+k"

qiao-wei avatar Oct 10 '24 11:10 qiao-wei

Ctrl+K still hasn't been merged into the main branch.

andrewpareles avatar Oct 22 '24 21:10 andrewpareles

For reference, see https://github.com/microsoft/vscode/pull/66418 and https://github.com/microsoft/vscode/issues/85682. We're going with editorInsets, the modern version of these. #119 has a Hello World editor inset.

andrewpareles avatar Oct 23 '24 09:10 andrewpareles

For reference, see microsoft/vscode#66418 and microsoft/vscode#85682. We're going with editorInsets, the modern version of these. #119 has a Hello World editor inset.

I don't think you can actually use it though right, they specifically mentioned that you can't use it in production. "/**

  • This is the place for API experiments and proposals.
  • These API are NOT stable and subject to change. They are only available in the Insiders
  • distribution and CANNOT be used in published extensions.
  • To test these API in local environment:
    • Use Insiders release of VS Code.
    • Add "enableProposedApi": true to your package.json.
    • Copy this file to your project. */"

sunmorgan avatar Oct 23 '24 21:10 sunmorgan

This is true if you're building an extension. We're not just building an extension, we're building a full IDE.

andrewpareles avatar Oct 24 '24 04:10 andrewpareles

The basic layout for Ctrl+K is now on main. It'll be implemented soon!

andrewpareles avatar Oct 28 '24 11:10 andrewpareles

@andrewpareles is it possible to change those keybindings?

Cmd+K is a standard shortcut for clearing the terminal window (it is also default in VS Code), but in Void when I press it opens the inline completion in the current tab instead.

manisenkov avatar May 24 '25 22:05 manisenkov

Yes, you can change them in Void Settings > Keyboard Settings! Just find the Cmd+K setting and change it to whatever you'd like.

andrewpareles avatar May 24 '25 23:05 andrewpareles

Thank you! I actually overlooked the command in the keyboard settings screen. It's called "Void: Quick Edit" and doesn't have any conditions. I set it to !terminalFocus, and now it works as expected. 👍

manisenkov avatar May 25 '25 00:05 manisenkov