Everybody writes notes. I found that my way of doing it was not efficient enough for some reason. I wanted to have them distributed in different folders (logical divisions) and have them synchronized to the cloud in an easy way plus being able to use a decent editor so I decided to give it a try with the one I had already installed: Visual Studio Code.
First of all, I installed the following extensions for VS Code:
Notes extension provides some cool options to ease the notes writing (TODO items and code fragments are key for me)
To accomplish my goal of synchronization to the cloud, I decided to use GitHub as the storage for my notes.
I created a folder for my notes and started a git repository there:
git init
Then I created a GitHub repo and added it as a remote to the repository:
git remote add origin git@git.....
I created a script to automate the synchronization with GitHub, I stored it under the notes folder in the path ".auto/commit.sh":
git add -A
git commit -m 'auto commit'
git push origin
As the last step, I configured RunOnSave extension by creating a configuration file in the notes folder under the path ".vscode/settings.json" with this content:
"emeraldwalk.runonsave": {
"commands": [
{
"match": ".notes",
"isAsync": true,
"cmd": "./.auto/commit.sh"
}
]
}
With the project configured in this way, once a "*.notes" file is saved, it gets automatically committed to the GitHub repository.
With this approach, I found a way to freely organize my notes in the folders I want and synchronize them in a frictionless way.