Handling notes has always been tricky for me. Should I use an app or have markdowns in a folder?
Lately, I decided to only use markdowns and have them centralised in a folder called
notes while making them accessible in the relevant projects via symbolic links.
- Access only project specific notes in VSCode (or any IDE)
- Keep a folder containing all of my notes
~ |-- .gitignore_global |-- Documents/ |-- notes/ |-- project_foo/ |-- project_foo/ |-- .notes/ (ignore from version control)
The first step is to have the version control ignore the notes in each projects. For example, I decided to have my notes in a
.notes folder under each project.
# Create a global gitignore touch ~/.gitignore_global # Add the folder that will contain the notes in each project echo .notes >> ~/.gitignore_global # Add the global gitignore to the git configurations git config --global core.excludesfile ~/.gitignore_global
Now, let's create the folder that will contain all the notes:
# Create the folder where all the notes will be centralised mkdir ~/Documents/notes
Finally, let's say we have a project called
project_foo. We can now create the folder that will contain the notes and link it:
# Create the folder where the project specific notes will be found mkdir ~/Documents/notes/project_foo # Link the project specific notes folder into the project ln -s ~/Documents/notes/project_foo ~/Documents/project_foo/.notes
notescontains all the notes
- Each project has a
.notesfolder with only related notes and ignored by version control
- All the notes are synced between the
notesfolder and the
.notesone in each project
Thanks to this architecture, I am now able to access my project's notes in my IDE directly and avoid using another app for that. To add to that, because they are synced in the
notes folder, I still have the possibility to open all my notes at once if needed.
Thank you for reading my first ever blog post and I hope it helps some of you :)
Let me know your thoughts and/or improvements!