Skip to content

Automaticaly synchronize vimwiki at startup and exit using git

Notifications You must be signed in to change notification settings

sebastianbock17/vimwiki-sync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

vimwiki-sync

This plugin:

  • automatically synchronize Vimwiki notes directory on Vimwiki startup and exit using Git.
  • it also synchronizes Task Warrior automatically
  • changed files are auto-committed.

Install

Use your Vim plugin manager, for example using Vundle, add this line to your .vimrc:

Plugin 'git@github.com:michal-h21/vimwiki-sync.git'

vim-plug

Plug 'michal-h21/vimwiki-sync'

Usage

This plugin automatically commit changes in Vimwiki directories. You need to initialize Git repository in these directories by hand.

Vimwiki directories can be configured using these g:vimwiki_list variable in .vimrc, for example:

let g:vimwiki_list = [{'path':'$HOME/notes'}]

This configuration declares the $HOME/notes as Vimwiki directory. You can initialize Git directory using:

$ cd ~/notes
$ git init

You can add remote repository for your project. Vimwiki-sync will push all changes to your remote on Vim exit, and pull changes on Vimwiki startup.

$ git remote add origin git@github.com:username/repo.git 

By default, we push and pull from the current branch of the remove Git repository. You can set the g:vimwiki_sync_branch to select specific branch:

let g:vimwiki_sync_branch = "main"

Taskwiki support

Vimwiki-sync automatically synchronize Taskwiki using Taskwarrior. To disable it, set the following variable:

let g:sync_taskwarrior = 0

About

Automaticaly synchronize vimwiki at startup and exit using git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%