Dual Journaling with Vimwiki: How to Separate Personal and Business Notes
Table of Contents ๐
In the previous post, we built a powerful journaling system using Vimwiki. Itโs a fantastic setup, but as you use it more, you might notice a common problem: your professional meeting notes start mixing with your personal reflections, and your work to-do list gets tangled with your weekend plans.
This is where the real power of vimwiki
shines. Itโs designed to manage multiple, independent wikis. In this guide, youโll learn how to create a dual-journal system to cleanly separate your personal and business notes, giving you a focused and organized workspace for every part of your life.
Why Separate Your Journals?
Separating your journals isnโt just about tidiness; itโs a strategic move to improve your workflow and peace of mind.
- ๐ฏ Focus & Context: When youโre at work, see only work-related notes. When youโre reflecting at home, you wonโt be distracted by project deadlines.
- ๐ Privacy & Security: Keep sensitive business information completely separate from your personal thoughts. No more accidentally sharing the wrong screen during a presentation.
- ๐๏ธ Better Organization: Searching for โProject Updateโ will no longer bring up notes about your personal projects. Finding what you need becomes instant.
- ๐ Professionalism: Use a structured, professional template for business meetings and a more free-form, reflective template for personal entries.
Step 1: Update Your Vimwiki Configuration for Two Wikis
The magic lies in g:vimwiki_list
, which, as the name suggests, can hold a list of wikis. Weโll define one for business and one for personal notes.
Update your ~/.vimrc
with the following configuration:
" Vimwiki Configuration for multiple wikis
let g:vimwiki_list = [
\ {
\ 'path': '~/Nextcloud/Notes/business-wiki/',
\ 'diary_template': 'template-business.md',
\ 'syntax': 'markdown', 'ext': '.md'
\ },
\ {
\ 'path': '~/Nextcloud/Notes/personal-wiki/',
\ 'diary_template': 'template-personal.md',
\ 'syntax': 'markdown', 'ext': '.md'
\ }
\]
" Optional: Set which wiki is the default (1=first, 2=second).
" If you don't set this, Vimwiki will ask you to choose each time.
let g:vimwiki_start_wiki = 2 " Make the personal wiki the default
" These settings apply to all wikis in the list
let g:vimwiki_markdown_link_ext = 1
let g:vimwiki_auto_diary_index = 1
Next, create the new directory structures in your terminal:
mkdir -p ~/Nextcloud/Notes/business-wiki/diary
mkdir -p ~/Nextcloud/Notes/personal-wiki/diary
Step 2: Create Context-Specific Templates
Now you can create a unique template for each journal, tailored to its purpose.
Business Template
Create the file ~/Nextcloud/Notes/business-wiki/template-business.md
:
# %Y-%m-%d โ Business
## ๐ฏ Today's Top 3 Priorities
- [ ]
- [ ]
- [ ]
## ๐ค Meetings
-
## ๐ Action Items
-
## ๐ Notes & Decisions
-
Personal Template
Create the file ~/Nextcloud/Notes/personal-wiki/template-personal.md
:
# %Y-%m-%d โ Personal
## ๐ Gratitude
-
## ๐ก Ideas & Thoughts
-
## โ
Personal To-Dos
- [ ]
## ๐ Learnings & Reflections
-
Step 3: Set Up Blazing-Fast, Unambiguous Shortcuts
With two wikis, the default <leader>w<leader>w
shortcut would now prompt you to choose a wiki, which slows you down. We can fix this by creating specific shortcuts for each journal.
In Your .vimrc
Add these key mappings to open the correct journal instantly:
" Shortcuts for separate journals
" <leader>wb -> Wiki Business
nnoremap <leader>wb :VimwikiSelect 1<Bar>VimwikiMakeDiaryNote<CR>
" <leader>wp -> Wiki Personal
nnoremap <leader>wp :VimwikiSelect 2<Bar>VimwikiMakeDiaryNote<CR>
VimwikiSelect 1
programmatically selects the first wiki in your list (Business).<Bar>
is Vimโs way of chaining commands together.- Now,
\wb
opens your business journal and\wp
opens your personal one. No questions asked.
In Your Shell (.bashrc
or .zshrc
)
Create specific aliases for launching directly from the terminal:
alias bjournal='vim -c "VimwikiSelect 1|VimwikiMakeDiaryNote"'
alias pjournal='vim -c "VimwikiSelect 2|VimwikiMakeDiaryNote"'
- Now type
bjournal
to open your business log andpjournal
for your personal one.
Bonus Tip: Linking Between Wikis
Sometimes, a work idea strikes during personal time, or vice-versa. You can easily link between your two wikis. From any note, use the wikiN:
prefix, where N
is the number of the wiki in your list.
For example, in your personal journal, you could write:
I had a great idea for work today: [[wiki1:A New Project Concept]]
Pressing Enter
on this link will create and open the A New Project Concept.md
file inside your business-wiki.
Summary
By leveraging Vimwikiโs multi-wiki capabilities, you have now built a far more robust and organized system:
โ
A clean separation between personal and professional life
โ
Custom templates tailored to each context
โ
Lightning-fast, unambiguous shortcuts for both Vim and your shell
โ
The power to intelligently link between worlds when needed
This setup transforms a simple journal into a comprehensive life management system, perfectly adapted to your needs.
๐โน๏ธ WHAT'S NEXT? |
Now that your journals are separated, we can explore advanced task management. In a future post, weโll look at how to aggregate tasks from both journals into a single, unified dashboard. |