Jump to content

Problem with code not keeping all the entered lines.

Recommended Posts

Problem with code not keeping all the entered lines such as:





With Android Studio, if you paste it into an already code block ready it will not have the entered lines at all but if you paste it without it, it will keep the entered lines.

With VS Code, pasting it in with and without the code block being there, it won't keep the entered lines. Can it be possible to Always keep the entered lines?

Sometimes there's a lot of code and going through them fast without putting the entered lines in can make it difficult to understand where everything should be ordered.

Link to comment
  • Level 5*

Hi.  Can your code be saved to a native file type?  If so, you could attach that file to a Note and open / edit it from there.  If you need the content for Evernote's search index you could copy/ paste the file content into the note body without worrying especially whether the formatting is maintained.

I imagine Evernote's issue is that in normal circumstances we don't want random spaces or line breaks in text,  but in this instance you do want the 'mistakes' in layout to be maintained.  The note is part of your normal database,  so goes through conversions that (presumably) have some error corrections that are messing up your code.

The situation is not going to change anytime soon,  so embrace the work-arounds or look elsewhere for a code library.

Link to comment

The other thing to remember is that EN will display a text file inline and may well respect spaces better. So paste your code into yur favourite text editor, save it and then attach the text file to a note.

  • Like 2
Link to comment
  • Level 5

I just moved a little code between CotEditor (4.4.4) and a code bloc in EN (Mac desktop client 10.52).

It kept all lines that were inserted in the editor.

Since above we only see pictures, I am not sure these additional lines are really controlled by adding an extra line, or if they are placed by the editor itself. I am not sure either what control character was used to created the lines - the most often used are probably ENTER and CR/LF. Maybe they are treated differently.

Since there seems to be an editor dependency, it will be hard to exactly reproduce the issue.

Link to comment

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...