D2 allows me to generate diagrams from the same source file using different layouts
It comes with two built-in layout engines :
Dagre is the default :
Other one is ELK This needs to be specified explicitly as :
D2_LAYOUT=elk d2 in.d2 out.svg
and here is the output
I came across D2 on Mastodon I think. (Like most things. But I can’t find the original toot 🤷♂)
I used mermaid.js earlier. In fact, I also added mermaid support for this theme.
Benefit of Mermaid is that since it is generated by mermaid.js, I don’t need to save and include the image in my blog (and worry about mismatched filename and/or path, resulting into broken image.)
On the other hand, not many hugo themes support mermaid, but link to an image is supported by hugo and every other SSG.
I wrote about Espanso long time ago. I have been using Espanso since then.
Recently, I had a need to add timestamp in a note. Espanso already comes with a trigger to insert date via :date. As the name suggest, it just inserts the date.
So I added the following to the match/base.yml file.
- trigger: ":timestamp" replace: "{{timestamp}}" vars: - name: timestamp type: date params: format: "%b %d, %Y %I:%M%p" As might be obvious, now I get timestamp just by typing :timestamp anywhere.
I came across stashpad during this
Stackoverflow podcast.
What caught my attention was when Cara mentioned
Everyone has untitled.txt open that they use every day
That is me!! 😆
It is really easy. Cmd + N to create a new empty file, and start typing.
I use BBEdit for this. I’ve seen my colleagues use Sublime text
I have also used Sublime text for exactly that and only that purpose for
a long time, since it saves these unnamed files across reboots/application
restarts. One less headache. I don’t have to think of what to name the file,
where to save it, format (this is easy, I’ll just save it as .txt or .md)
Later I came across BBEdit, which does exactly same, so I switched.
My workflow did not change.
Stashpad promises to make the same workflow better.
I have just installed it, and haven’t used it yet.
Ironically, I started typing my thoughts about Stashpad as a Stashpad note,
with intention that I’ll copy this into a blog post “later”. But decided that
why not directly write it as a blog ? 😆
I use SPC / a lot to find stuff inside a project. Since starting on Ruby project, a lot of my search results, specifically the first ones are inside the spec file (which is test case in Ruby)
I may want those instances as well, but more often than not, I prefer the search results in the source code before test cases.
The project is huge, and I have to scroll a lot before I see non-spec code, which becomes tiresome.
When I am working on a project, it is highly likely that I would open other files from that project. In order to do that, in Helix I would do SPC F. This opens up file picker for that workspace.
I can then either navigate using arrow keys, or most likely start typing the name of the file and the file will be highlighted. As a side benefit, the file is shown on the right pane as a preview.
Helix is a great editor. I’m trying it more and more these days (Like this post is edited in helix)
While shift from action->object to object->action in itself is big change (muscle memory), there are indeed other differences as well.
Luckily, it is easy to add keybindings to helix. Turns out someone took this too far, and created a lot of keybindings to make helix more like Vim
Refer to this for the entire config.
Noticed that new version 22.08.1 of helix is now available. See this Upgrade via your preferred package manager.
After the upgrade, used hx after a long time.
I also signed up for the matrix channel. Turns out that is where all the action is.
I’m member of (almost-dead-but-not-quite) Telegram group for a while. But matrix channel seems active.
I got immediate reply to my query. Nice!
My query was : How do I go to the last line of the buffer ?
If you are reading my posts, you would have realized that I had switched to nvim and went down the rabbit hole with different configurations etc. I think I got it to a stable state, and then I stopped tinkering.
But when I recently started coding again in Ruby, I realized that nvim is good as an editor, but at least I was not able to configure it as IDE. It has all the right tools (lsp, syntax highlighting, packages) yet something didn’t work 😞
I had written about Telekasten earlier, but in the context that I was unable to get it working with NVChad.
But I must confess, I almost forgot about it.
I should use it daily (as intended) to capture things I’m doing, where am I blocked, what unblocked me, make it as part of my daily workflow.
I have seen my colleague keeping a simple daily.txt file open in Sublime, and it works for them (I hope)