Plain text journaling in Vim
peppe.rs
peppe.rs
In this article, you'll see the demo content is a lot of "buy apples" and "make apple pie," but note that no to-do items exceed 18 characters which is the maximum length to fit nicely in that layout. So if you need to "buy turkey baster" (18c) you're OK, but if you need to "return turkey baster" (21c) you've overflowed the layout. Likewise, you can "call Alexander" (15c) but "send thank you card to alexander and elizabeth" (46c) is way over budget, and you'll need to mutilate it down to "ty card alex&beth" (18c) to fit. This leads, in the example, to shortening items to something like "shopping trip," at which point too much context is lost (what if you have a second shopping trip?).
Likewise, if you want to dump all the todos you can think of for the week and it's 20 or 30 small items, it's not clear that would work well in these layouts.
This is not to malign this system which I think is really cool, but to suggest that it's more useful to see real and more varied content in a system like this to see how it "really looks" rather than exclusively made-to-measure content of 1-6 super-short items per list.
0: https://anjahome.com/summer-bullet-journal-ideas/#What_Is_a_...
https://jodavaho.io/posts/bash-journalling.html
https://jodavaho.io/posts/bullet-journalling.html
It is essentially:
- One hidden folder for journal entries
- Each entry is a file of the form YYYY-MM-DD.md
- A bash alias will open today's file (or "yesterday" or "next thursday" or "2 weeks") using the date cli util
- A few vim formatting steps make the already-well-functioning github markdown work very nicely.
However my script only opens up the current date - love your extension to enable opening up other dates - gonna steal that :)
The main thing is that Joplin is still markdown, and I can trivially export if I want to switch to something else.
function journal() {
vim $logdir/$(date +%Y-%m-%d -d "$\*")
} function journal() {
vim $logdir/$(date +%Y-%m-%d -d "$*").md
}
Thanks!Some others have said it but the only problem with a lot of these systems is that by their very nature they are a better experience on a desktop than on mobile. Joplin is the only one I've used that even attempts to solve that problem. Even when you have one that works on mobile its a second class experience IMO. I used to try really hard to find a note capture system that I loved that worked in both environments. These days I just use apple notes on mobile and nb on desktop.
So do you store all your files in DropBox and the use Joplin to access them via mobile? I’m intrigued by how the two interact.
I don’t even try to access via mobile. You can but it’s a second class experience. I just use Apple notes and transfer anything I care about over to nb about once a week or so.
You probably can get a mobile thing going w Joplin or obsidian but it would require a little bit of scripting to get nb to pick up any new notes you create as it relies upon .index files at the root of each directory to know it’s contents instead of doing I/O operations. I assume this is for performance reasons.
https://github.com/Aperocky/diarycli
`pip install diarycli`
Alternatively there is a shell version if you are averse to python/pip package manager as well:
https://github.com/Aperocky/diaryman/blob/master/diaryman.sh
I've been using this for years, it doesn't have any fancy features - it only reliably opens up/create today's diary in vim whenever I type `diary` in command line. with some minor utilities.
It is life changing - having `diary` where I can type my thoughts into whenever. I maintain a separate one both for work and life - and both are proving invaluable.
It looks through the folder (i.e. year/month/date.md) and try to find whether today's diary exist. If it does exist it just opens it, otherwise it creates it.
The script actually accept other terminal editors if you edit a single line in the package. I imagine it will be easy to change to use sublime as well.
Works pretty well, except for those times you don't have data.
(Not an employee, just a big fan)
I don't use any of Obsidian's fancy features, apart from tags and the occasional note link (so that I don't have to copy-paste a reference from another note).
I use the "daily note" feature if I want to jot something down quickly. I then formalise it later and when I'm at my computer, I check in the markdown files into git with a script that modifies the timestamps of the commit(s) to match the last-modified date of the files I'm checking in. This is so that I can know exactly when I wrote down a note, so that I can correlate the commit with other records like my browser history.
After many years I've eventually landed on using [work ticket tracker] for work tracking, Apple Reminders for todo lists which are rarely complex items, and Logseq for journaling. My journal really is just that, I rarely go back to previous entries, but I find it helpful to spend a bit of time each day just noting down what I did and how I felt about it. I sometimes joke that this is my insurance policy in case the Police knock on my door and ask me what I did on the 12th of March this year.
I honestly enjoy it less than some of the more complex plain text systems I’ve used/built in the past but it has the advantage of actually being practical for me.
It’s probably almost a decade since I last used an abbreviation; I consistently found I just didn’t quite like them, and migrated to other ways of doing things. It was digraphs at first, still a Vim feature, and then Compose key sequences, which is where I’ve stayed ever since, preferring them mostly because they work everywhere, not just Vim. Now I type apostrophes, quotation marks, dashes, and other interesting things as I go perfectly casually, and would hate to be without a Compose key. (I’ve typed every non-ASCII character in this comment with my Compose key—just as well I still remembered · even though I practically never use it any more.)
> You can use x and o as well, but × (U+00D7, MULTIPLICATION SIGN) and · (U+00B7, MIDDLE DOT) are more … gourmet.
I’d go more gourmet than that: I use • (U+2022 BULLET) and ‹ugh, gobbled by HN› (U+2713 CHECK MARK) for lists. If you really wanted a cross, you could also go with ‹ugh, gobbled by HN› (U+2717 BALLOT X). The ordering holds, either way: 0x2022 < 0x2713, though I cringe at unbridled sorting of these lines.
(I do all my own writing in a lightweight markup language I’ve been developing, one property of which is that it leans on CSS Counter Styles for lists for spectacular matching of source and compiled result, so that you can write “(i) ”, “17. ”, “• ”, “‹CHECK MARK› ”, &c. and get matching appearance in the HTML output—or will, when I finally get round to finishing the parser and implementing HTML conversion. I write lists with mingled •, and bullets and it’s great.)
Anyway: back to the abbreviations matter: you could also enter all these characters with digraphs (CTRL-K …) or Compose key sequences (Compose …, but since your keyboard lacks a Compose key you’ll need to map one—I use RAlt on my current laptop because that’s conveniently positioned, but I really wish my spacebar was just split into at least three keys):
• · is digraph .M or ~. and Compose sequence .- or .^ or ^.
• × is digraph *X or /\ and Compose sequence xx
• • is digraph oo and Compose sequence .=
• ‹CHECK MARK› is digraph OK and a popular Compose sequence is @/ (present in kragen’s list, as included out of the box by WinCompose, but not standard on other platforms)
• ‹BALLOT X› is digraph XX and a popular Compose sequence is @X
You can define your own Vim digraphs too (:digraph), and make your own ~/.XCompose to set your own Compose sequences.
https://marketplace.visualstudio.com/items?itemName=GuidoTap...
With the list of Unicode characters supported here:
For journaling I use the same directory structure but it is also a Hugo site so it can be simply turned into a blog.
I have also other categories in my system (notes which serve as blog articles; people which is my personal CRM where I also maintain my genealogy tree data; songs where I collect my favourite songs with chords and lyrics; music where I maintain my compositions; books I've read with reviews and scores etc.).
Hugo supports YAML preambules so you can add whatever metadata you wish to your files. Everything is in Git. Content is in Markdown.
It's a matter of a one-line command to get my weight stats or the last time I met someone or how many books I've read last year. I don't need to know these but it's easy to get that.
I have some bash scripts/aliases, e.g. to write a journal entry I use command `j` which will open four last days in vertical windows in Vim (and create the missing files if necessary and commit the changes then).
To seach any file inside the system I use fzf. You can simply use grep and other tools to navigate and work with the system. The public part is published by building the site and copying the data to my server. A matter of a few key strokes.
I guess it's time to describe it in more detail on my website.
Where it fell apart, and where I expect this approach might fall apart also:
- While it worked really well on desktop, I didn't find a way to make it translate to mobile. Sure, I could just edit the plain text file, but that's not enough when you have hundreds of todos scattered around.
- I had to remember too much about how all the different scripts worked together. I kept forgetting the commands I'd defined, especially when I was tired or stressed.
My middleroad these days is NotePlan. It gives me what I liked about bullet journaling (for me it's the 'rapid logging' part) but presents it in a sleepless night-proof UI that works well on iOS at the same time.
Are you running a terminal or do you export as PNG or HTML?
Do you leave it running 24/7? Won't that burn the monitor?
Nice project.
It can be as detailed or simple as you like, with built-in date keeping functionality. This article spends a lot of time getting that part.
I use it on Doom Emacs but it's available on vim too
Also, shouldn't it be
cal -m 1
In zsh it complains without the extra argument.The only issue with Docs though is there's no Vim support of course, which has annoyed me for a while. I finally got around to building an extension for it though if anyone is interested: https://chrome.google.com/webstore/detail/vim-for-google-doc...
I always think of a journal as something containing notes that are raw enough that I would be embarrassed if any other person read them. The idea of sending that over a network to be stored in plain text on someone else's server is just horrifying to me.
I'd rather open JuiceSSH and log into my machine and open vim. Or I could use Synology Drive to edit a plain text document stored on my NAS. Is that really -that much- less convenient than opening a Google Doc? How inconvenient does the task need to be for me to allow random Googlers or their algorithms to read my innermost thoughts?
For a while I had some scripts that converted my vimwiki files to html and saved them to Google drive, and it would also find and extract pending todos.
As people have mentioned it requires a laptop with linux and vim on it, which is not very compatible with my work (windows machines) or my phone.
I wonder if buying something like a GPD pocket will solve this.
At the top i have a template command for creating a current timestamp
echo $(date '+%Y/%m/%d %H:%M:%S|%a| ') #run with :!!bash directly within vim. I copy this line and run it with :!!bash to init a new entry.
2023/06/19 20:52:02|Mo| Then I write my entries as oneliners
2023/06/19 20:52:02|Mo| Its grep-able like a normal system log file
2023/06/19 20:52:02|Mo| I also use tags, so i can more easily follow 'threads' #corrupt_storage
2023/06/19 20:52:02|Mo| Bad day today #disaster
vi code.go README ./notes ~/notes/topic reqs design TODO script.sh ~/journal/YYYYMMDD interesting.log scratch # etc
then git, rsynch, grep (etc) to heart's content
main hole is on phone where vi doesnt fit well, but on there either the builtin Notes app or a thirdparty GUI text editor/viewer is fine ("sneaker shared/synched" as needed). though bias to work on laptop where total time efficiency matters
I do actually use the same concept of putting `TODO` `WIP` or `DONE` at the beginning of each task line, and I am usually using a task list with subheadings on any given day.
https://github.com/Aperocky/diarycli
Or shell if you prefer that:
https://github.com/Aperocky/diaryman/blob/master/diaryman.sh
Been using this for 5 years+, and hopefully for decades more.
Admittedly, getting to this point with Obsidian is a bit of effort, but being on the other side I think it's worth it.
The Git plugin also automatically syncs my vault to a private github repo, so I always have my notes available from anywhere.
>λ vim journal/2023/1
I think you mean 01
This is how I write notes, and it's served me well for years.