Copy / paste to OneNote loses all spaces
I'm learning python and am making notes in and adding code snippets to MS OneNote. I'd like be able to copy from the PyCharm editor and paste with formatting. However, all spaces are lost on pasting. Seems to be something specific about the PyCharm / OneNote combination (e.g. works fine with VS).
My current workaround is to paste into Notepad++ with that using Python formatting, copying from there and pasting into OneNote. Obviously a bit of a pain.
I can't find any settings on either programme to get around this.
Any ideas?
Please sign in to leave a comment.
Following thread... I am having the same problem copying from IntelliJ and pasting into OneNote. When I do this action of copying from VS Code, it carries over the font color and formatting into OneNote.
Just in case you wanted more details on my workaround to keep all that coloured and formatted goodness:
- Install the NppExport plugin in Notepad++
- Change the Copy All Formats to Clipboard shortcut from NppExport to CTRL-C
- In Notepad++Language menu, select Python (or whatever you need)
Now I keep a blank tab open in Notepad++, copy from PyCharm into NotePad++, copy from there and paste into OneNote. Naturally a bit of the pain, but then all of the formatting is there.
Hello,
this is a known bug, unfortunately, https://youtrack.jetbrains.com/issue/IDEA-185049 please feel free to vote.
Thank you Antonina!
I've voted and added a comment, but with only five votes and no comments since 2018, I'd guess the dev team will be prioritising other stuff :(
My workaround is to paste the code copied from PyCharm as plain text into OneNote, and use the One More plugin to format the source code.
Go to preferences -> Edit & View -> Paste Options -> Keep Text Only