Jump to content

Why are TABS not shown in code window


Recommended Posts

Posted

Hello, 

I pasted some C# code from Visual Studio into a new note complete with spacing and tabs.  However when 

I go back and look everything is left aligned.  I thought the code block was supposed to honour the formatting.  Is this not the case? 

GetAttachmentThumbnail?id=AQMkADAwATM0MDAAMS05NjNmLWJiADY5LTAwAi0wMAoARgAAAzcXJNncnwlIufhxwmHRltwHABEBSvpGzvJKvxn6Kl52UtgAAzAc1SAAAAARAUr6Rs7ySr8Z%2BipedlLYAAM3Iqo%2FAAAAARIAEABOGSVibuAGS7Z79B%2BMrQ2P&thumbnailType=2&owa=outlook.live.com&scriptVer=2020022303.15&isc=1&X-OWA-CANARY=9RjGssSSSUiWJU-v3Mv8LhBKAmp2wNcYDyAnT3I5sUARlIPX_Sh4WdoGg-V70GWv6YVcyZhsw8g.&token=eyJhbGciOiJSUzI1NiIsImtpZCI6IjU2MzU4ODUyMzRCOTI1MkRERTAwNTc2NkQ5RDlGMjc2NTY1RjYzRTIiLCJ4NXQiOiJWaldJVWpTNUpTM2VBRmRtMmRueWRsWmZZLUkiLCJ0eXAiOiJKV1QifQ.eyJvcmlnaW4iOiJodHRwczovL291dGxvb2subGl2ZS5jb20iLCJ2ZXIiOiJFeGNoYW5nZS5DYWxsYmFjay5WMSIsImFwcGN0eHNlbmRlciI6Ik93YURvd25sb2FkQDg0ZGY5ZTdmLWU5ZjYtNDBhZi1iNDM1LWFhYWFhYWFhYWFhYSIsImlzc3JpbmciOiJXVyIsImFwcGN0eCI6IntcIm1zZXhjaHByb3RcIjpcIm93YVwiLFwicHJpbWFyeXNpZFwiOlwiUy0xLTI4MjctMjEyOTkzLTI1MjA3NTkxNDVcIixcInB1aWRcIjpcIjkxNDgwMDQ5MDAzNjA3M1wiLFwib2lkXCI6XCIwMDAzNDAwMS05NjNmLWJiNjktMDAwMC0wMDAwMDAwMDAwMDBcIixcInNjb3BlXCI6XCJPd2FEb3dubG9hZFwifSIsIm5iZiI6MTU4MzM1MTgzMiwiZXhwIjoxNT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Fp9FhJ5MCLDevtVw9WO1a6kPbEDF44pC2g&animation=true

 

Thanks 

 

  • Level 5*
Posted

NOte: your attachments didn't come through.

33 minutes ago, thedavegray said:

pasted some C# code from Visual Studio into a new note complete with spacing and tabs.  However when 

I go back and look everything is left aligned.  I thought the code block was supposed to honour the formatting.  Is this not the case? 

Tab characters don't really exist in Evernote (being based on a HTML-ish language). So Evernote currently just replaces them with 4 spaces. Since I don't use tabs in my code (4 spaces for me, too), this all works out fine for me. The alternative would be to use some kind of CSS trick to enforce tab indentation. Could work, I suppose, and it may be that they've tried it before,. But of course, if you do that, then you can't cursor through the indents in the same way you can via tabs.

I don't know how far Evernote intended to honor formatting in code blocks. It's definitely on the 'lightly' end of the spectrum.

Is this Windows? Mac?

  • Like 1
Posted

Hi Jeff, 

Thanks for your detailed response.  I'm not specifically setting tabs or spaces as Visual Studio does all that 

and however you format it does it's own thing. I may just paste code into a text editor en-route to Evernote in 

future.   

This is on Windows 10 with Evernote running in Chrome browser as opposed to the Windows app. 

Thanks 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...