I used to copy code from Visual Studio Code (VSC) and paste it into Google Docs on Google Drive without any issues, preserving the indentation and styles. However, in the past three months, all the indentation gets lost when pasting into Google Docs. I have to manually reformat everything, which is time-consuming and hampers my note-taking process.
What could have changed, and how can I fix this issue? I want to restore the previous behavior where the indentation and styles are preserved when copying code from VSC to Google Docs.
> Version: 1.80.1 (Universal) Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771 Date:
> 2023-07-12T17:20:23.298Z Electron: 22.3.14 ElectronBuildId: 21893604
> Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0
> OS: Darwin arm64 22.5.0
Examples:
But when copying and past in translate.google it does not lose indentation, but when copying from translate.google to Google Docs it loses only the black background and colors of code but saves indentation. Maybe the problem happens in Google Docs, not in VSC.
Thank you!
Copy With Syntax Highlighting
command in VS Code's command palette? – Ribonuclease