Code snippets in Agenda notes

What I did:
I wanted to paste a code snippet in a note (log about program I’m writing)

What happened:
Line spacing is very wide, @var and @return are converted to badges (see attachment)

What I expected:
A correct paste of my code snippet… (can I use a formatting such as ?

Things that might be helpful to know (Agenda version, OS and model, etc):
Code formatting?

2 Likes

The way to go is to use the “Preformatted” paragraph style to do this.

  1. Select the preformatted style
  2. Choose Edit > Paste and Match Style

Drew

Hi Drew,

Thanks, the badges for the @ strings dissappeared, but linespacing is too high…
Original coding (IDE):
26

A paste code option would be great.

Keep up the good work!

In Agenda notes, it becomes:

That is body text, which spaces each line (paragraph) more.

What you want to do is select the preformatted style first, and then paste. So choose Format > Style > Preformatted, and then paste immediately there (don’t move the cursor).

Drew

Hi Drew, this did it. Many thanks!

1 Like