continue icon indicating copy to clipboard operation
continue copied to clipboard

Copying code from VSCode into Continue should format as code

Open JoelEinbinder opened this issue 1 year ago • 0 comments

Validations

  • [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [X] I'm not able to find an open issue that requests the same enhancement

Problem

Right now if you Cmd+L with some code highlighted, it nicely highlights as code in the continue window. But if you copy and paste some code into the window, it just appears as plain text.

Solution

You can detect that some paste has come from VSCode by checking the application/vnd.code.copymetadata or vscode-editor-data mime types. Unfortunately they don't tell what file/line the code came from, but you can probably do a good guess by looking at the selections in the open editors.

If this feature gets implemented, it is important that Cmd+Shift+V pastes as plaintext. And I'd expect a button to remove formatting from code windows.

JoelEinbinder avatar Apr 09 '24 22:04 JoelEinbinder