Operating system: Linux (Pop_OS)
I often write a brief entry, then add to it throughout the day using the command:
jrnl --edit
My editor of choice is vim, but I noticed that when I go back and read my entry using the command:
jrnl -n 10
It typically has a ' | ' at the beginning of every line I edited. The original entry does not have a ' | ', so it only occurs after I edit. Further, if I go back and edit, the ' | ' symbols don't appear in my editor. Also, when I make a long entry simply using:
jrnl
Everything comes out clean. What could be happening here? Is it a vim thing? Is it a problem with how I configured the editor? Also, how do I clean up the ' | ' symbols?
I can reproduce this in my machine by simply making a short entry via jrnl today: Then editing the entry via jrnl --edit (again, using vim as my default editor). Then using jrnl -n 10 The output looks something like the following:
2020-04-29 09:00 hello world
|
| This is the edited line.
| This is another edited line.
| Please help me?
I'd like to clean up the ' | ' lines in my journal, and not have them inserted when editing!
This is the intended behaviour, but effects the display only and not your actual entries. When you "read" your journal though jrnl, it does some light formatting, namely, adding bars in front of body lines (and I believe linewrapping and space between entries as well).
If you want to confirm this yourself, you can open the raw journal file in a text editor.
Also, the latest version of jrnl is 2.4, and should be available through pip. The above behaviour stays the same, but v2.4 includes about two years of bug fixes on v1.9.8.
Yup! @MinchinWeb is right. That's just the way we format entries by default.
If you don't like that format, you can change the format by using the export flag (e.g. --export=markdown), which will change how your journal is output to you.
Also, pip is usable, but I should note that our preferred install method is pipx.
Thanks for the info, @wren and @MinchinWeb . I've updated my version by installing via the pipx method, and now I have the newest version.
I really like the format by using the export flag --export=markdown. Is there any way I can make this output my default way of reading my jrnl entries via jrnl -n instead of the other way?
Sorry if this is incredibly obvious. I'm a bit of a newb at this stuff. (But hey, I'm learning!)
No worries; we're here to help!
We don't currently have a way to specify a default export format, but I think that's a good idea.
You might be able to get close to this functionality with an alias, but I haven't tested it to see if there's any gotchas.