Using Joplin
I don't know why I haven't given this a proper look before. Essentially Joplin is a markdown editor application that enables the creation of multiple notebooks, supports tagging and enables the synchronisation of notes between multiple devices. Currently I have it installed and working perfectly between my laptop, smartphone, tablet and Linux VM, with all notes synched flawlessly.
One of the main things I like about Joplin is it's perfectly usable as a standalone application, without having to register an online account or upload anything to a third party server. Oh, and there is also a Joplin Web Clipper extension, which might be handy for Chrome users.
Encryption
All notes (and notebooks) can be protected by end-to-end encryption when using a third-party service for synchronising data. Joplin uses the Stanford JavaScript Crypto Library implementation of the AES128 or AES256 (depending on the hardware) cipher, with a password-derived key (SHA256 fingerprint of the password, I think), and this happens before the notes are uploaded to whatever location. The same password and server authentication details must be set on another instance of Joplin in order for that to download and decrypt the notes.
Terminal Application
It took a few hours to get Joplin working in the Linux command line. Most the problems were caused by doing most things from the user account, running 'sudo su' a lot and including the global (-g) switch when running 'npm install', as recommended in the official documentation - this caused some confusion over permissions and locations of modules. Plus I'm pretty clueless when it comes to NodeJS. The other problem seemed to be caused by not having the development/build packages installed, in particular libcrypt-dev.
In the end I nuked NodeJS, making sure to purge everything:
sudo apt-get purge --auto-remove nodejs
sudo apt-get autoremove
Next, I re-installed NodeJS from scratch and added NVM, from my normal user account. After that, I installed libcrypt-dev (missing for whatever reason) using apt-get, and attempted to install Joplin again. This time I did it without using the -g switch for 'npm install'.
If the installation was successful, there'll be a 'joplin' script file in ~/.joplin-bin/bin/. A link to that can be created in /bin by switching to root (instead of using sudo su) and running the following command:
ln -s /home/[username]/.joplin-bin/bin/joplin /usr/bin/joplin
With that set up, Joplin can be started just like any terminal application.
And it was definitely worth the effort. I was pleasantly surprised to find the commands and keybindings very intuitive, and it required only a few commands to configure the synchronisation, set the master password and set Vim (my editor of choice, which I'm using now) as the default editor.