• Journalling with Vim

    I’ve toyed on and off with journalling for some time now. Not blogging, which is a much more public activity focused on sharing, but true journalling: the writing of thoughts for personal reasons and not for public consumption.

    But it’s never really taken.

    I’ve tried to be consistent about writing travel logs for major trips, as I do find that activity extremely powerful for both cementing memories at the time and allowing me to refresh my memories after the event. But beyond that, it’s not something I’ve been able to turn into a habit.

    Now, my past attempts always focused on putting pen to paper, but recently I realized that, as fascinated as I am with notebooks and so forth… well, I bloody well hate physical writing! Because I’m horribly out-of-practice, it’s slow, tiring, and messy, while affording me no real benefits. It simply gets in the way, and in doing so, makes the act of journalling more unpleasant.

    And, the reality is I’m a technologist. My tools are the screen and the keyboard. Why fight that?

    So I decided to turn to those tools to build an alternative stack built on Vim, plus a few plugins, based on this blog post.

    For basic journalling functionality, vimwiki and calendar-vim are a perfect combination:

    Automatic timestamped files with basic markup and linking. Simple. Easy. Portable.

    After that, it’s all about ergonomics. My preferred writing environment is spartan and attractive, with a large, easy-to-read font. That brings us to a few additions:

    Finally, we have a bit of vimrc configuration that I’ve found handy:

    " Automatically switch to writing mode when a wiki page is opened.
    au FileType vimwiki set guifont=Office_Code_Pro_Light:h14|call pencil#init({'wrap': 'soft'})|set sbr=
    
    
    " Turn on Limelight when Goyo is enabled
    autocmd! User GoyoEnter Limelight
    autocmd! User GoyoLeave Limelight!
    
    " Hotkey mapping to open the calendar pane
    map <leader>C :Calendar<cr>
    map <leader>G :Goyo<cr>
    

    And voila!

    Now, I’m still getting used to this setup, so I could see it requiring additional tweaks. And it is Vim, so it’s not the ideal word processing environment (though I finally figured out the right formatoption tweaks to get paragraph reflow to mostly work the way you’d expect). But it’s simple and it works!

    The only remaining question is whether I’ll actually start building up the habit…

  • macOS as NAS

    So, as I mentioned previously, one of my ideas for my hackintosh server was to turn it into a backup server/NAS for my home. As a server, the NUC is an excellent option, being low power, quiet, and incredibly compact. And while I can do some amount of backing up to cloud storage (i.e. Drive), for regular day-to-day backups a proper local solution is preferable.

    Now, Lenore and I both have Windows 10 equipped laptops, which means we can take advantage of the File History feature to actually perform backups to a designated network drive. So, it would seem that simply setting up a drive share on the Mac, and pointing our laptops at it, would do the job nicely!

    Au contraire.

    A few releases back macOS moved away from Samba to their own implementation of SMB (the Windows file sharing protocol). Well, apparently that implementation of SMB does not work with File History. And I have no idea why. The errors you get make no sense, and there’s basically no solutions out there on the internets.

    You’d be amazed how long I spent pulling my hair out over this one.

    Ironically, the solution I arrived at was as silly as it was obvious: I deployed an Ubuntu Server VM running headless on the Mac via VirtualBox. The VM mounts the macOS filesystem and shares it using Samba.

    But it works! We now have backups!

    And while I was at it, I also finally set up Transmission and Flexget so I could move my bittorrent activity to the Mac as well. The downloaded content is shared using the built-in macOS drive sharing features… for basic reads it seems to work just fine. For now, anyway.