Day 749
.vimrc conversion saga
In [Day732]({{site.baseurl}}{% link _posts/2021-01-02-day732.markdown %}), I changed my ./vimrc
to utf8 from latin-1, to be able to use the “◦
” symbol to mark trailing spaces.
Well, it broke the vim macros for the link wiki (from [Day 450]({{site.baseurl}}{% link _posts/2020-06-23-day540.markdown %})) :( I had the latin version of the .vimrc backed up, falling back to it for now.
I need to think of a way to save these macros better, because even copypasting them to this dtb didn’t work and I had to do text encoding magic. I think this is exactly the time one should use a proper scripting language like Python, and write another small qutebrowser script that changes the contents of the filled textarea.
jekyll markdown links to posts
link
links to pages, post_url
links directly to posts inside _posts
.
Link to pages:
{%raw%}
{% link _collection/document-name.md %}
{{ site.baseurl }}{% link _collection/document-name.md %}
{{ site.baseurl }}{% link _posts/2019-03-06-post-title.md %}
{{ site.baseurl }}{% link services/index.html %}
{{ site.baseurl }}{% link /assets/documents/pal-codes.pdf %}
{%endraw%}
Links to posts:
{%raw%}
{% post_url 2019-03-06-post-title.md %}
{{ site.baseurl }}{% post_url 2019-03-06-post-title.md %}
{{ site.baseurl }}{% post_url /folder/2019-03-06-post-title.md %}
{%endraw%}
Copied directly from this excellent page, I never found this explained in such a readable way: How to create internal links in Jekyll | Web Island Blog
TODO Jekyll / dtb / meta
Write a small script that allows me to easily link to days just by their day number.
Jekyll changed post permalinks
Before URI contained the date and was hard to link to. Now I changed this in _config.yml
:
permalink: :title:output_ext
Links are now like this: https://www.pchr8.net/d/dtb/day749.html
Python representing infinity
float('inf')
works for floats, but there’s no way to do it with int
s. math.inf
is also a float. 1
vim interrupt operation via <Ctrl-C>
Made a typo, vim attempted to indent 20k lines (and started counting “xx lines to indent…”, intuitively pressed <Ctrl-C>
, it successfully interrupted the operation!