elvirbrk / NoteHighlight2016

Source code syntax highlighting for OneNote 2016 and OneNote for O365 . NoteHighlight 2013 port for OneNote 2016 (32-bit and 64-bit)
GNU General Public License v2.0
3.79k stars 393 forks source link

Intend spaces are wrong #88

Open octav1an opened 5 years ago

octav1an commented 5 years ago

Hi! I have a problem with the intend spaces when 'Copy To Clipboard' option is enabled. In the image below you can see on left: is the default result of the code when it was copied from VS, placed in NoteHighlight2016 with Copy To Clipboard enabled and pasted inside OneNote page, and on the right: each intend was done using Tab key inside NoteHighligh2016 window. For some reason when the code is copied to clipboard without replacing the intends with tabs it will make 8 spaces instead of 4. Snipaste_2019-05-12_14-41-49 I think this issue was also mentioned here https://github.com/elvirbrk/NoteHighlight2016/issues/48 , but the problem with using the Merge Formatting Option is that it will paste the code snippet using OneNote default font (in my case Segoe UI) and when I change it to Courier New I again get 8 spaces for every intend.

I should mention that when I don't use 'Copy To Clipboard' option the indent problem is not there, however it will place the table with code in a new block at the top of my current working block and also push my block a bit lower. For most of my notes, I use one block per page, that can get pretty long, and returning every time to the top copying the table with code in my working block and moving my block up again is frustrating.

I use the last version of NoteHighligh2016 : v3.6

My solution right now: automatically replacing all intends with tabs in Notepad++ then copying it to NoteHighlight2016.

Thanks.