serhii.net

In the middle of the desert you can say anything you want

04 Sep 2020

Day 613

Finally fixed the date / time / tztime saga

Looked into the TZ environment variable, it’s the overwritten “Berlin” one. I forgot I had this beauty in .zshrc: export TZ="/usr/share/zoneinfo/Europe/Berlin"

Probably a relict of an old hacky way to set time when I couldn’t do it properly.

Interestingly, even i3status listened to it (how? why? At which point does it access zsh environment variables? Are environment variables zsh-specific and accessible to things started by/within zsh? How does this work? TODO). And interestingly, restarting zsh didn’t get date to output the right date, even with the right timezone set, I had to close and reopen the terminal.

Removed that line, restarted i3, now all times are set right and I can remove timezone info from my timestamps.

Vim insert time and date - updated mappings

imap <leader>d <esc>:put =strftime('%c')<cr>kJA
imap <leader>t <esc>:put =strftime('%H:%M:%S')<cr>kJA

They look like this:

Fr 04 Sep 2020 09:54:59 CEST
09:55:00

Qutebrowser / vim copypaste

If I’m copypasting something from vim with yW it copies the space after the last word. If I then paste it into the search of qutebrowser it won’t find anything if the string in the page doesn’t have a space after it.

git diff CSVs at field level

git diff --color-words="[^[:space:],]+" 1

daff tool for diff-ing CSVs

Daff is a “library for comparing tables, producing a summary of differences”. GitHub - paulfitz/daff: align and compare tables

It actually does a really nice visualization with colours, like that script I wrote a long time ago. Leaves field numbers too. In general it’s awesome.

More options available with the full form: daff diff --id field --padding sparse file1 file2 Has a lot of output formats!

Even ordered/unordered works, if you don’t set the wrong id column.

Vim folds empty line

To make the markers marking folds easier to edit, one can select an empty line at the end of zf, they will end up on a line by themselves, and you can happily paste stuff inside the fold.

Nel mezzo del deserto posso dire tutto quello che voglio.