Basic VimWiki config and template for daily diary
Diffstat:
3 files changed, 50 insertions(+), 0 deletions(-)
@@ -0,0 +1,40 @@
#!/usr/bin/python3
import sys
import datetime
template = """# {date}
## Daily Checklist
* [ ] Leetcode
## Todo
## ESP
### Effort
### Success
### Progress
## Notes
"""
date = datetime.date.today()
if len(sys.argv) < 2:
date = sys.argv[1].rsplit("/", 1)[1];
date = date.split(".", 1)[0];
print(template.format(date = date));
@@ -30,6 +30,8 @@
Plugin 'keremc/asyncomplete-clang.vim'
Plugin 'sheerun/vim-polyglot'
Plugin 'bfrg/vim-cpp-modern'
Plugin 'vimwiki/vimwiki'
Plugin 'morhetz/gruvbox'
call vundle#end()
@@ -40,6 +42,7 @@
filetype plugin indent on
" File settings
set encoding=utf8
set autoread
set syntax=on
" Spelling
set spell
@@ -105,3 +108,4 @@
highlight Visual ctermfg=yellow ctermbg=gray
source <sfile>:h/clangd.vim
source <sfile>:h/gruvbox.vim
source <sfile>:h/wiki.vim
@@ -0,0 +1,6 @@
let g:wikidir = $XDG_DATA_HOME."/vimwiki"
let g:diarydir = g:wikidir."/diary"
let g:vimwiki_list = [{'path': g:wikidir, 'syntax': 'markdown', 'ext': '.md'}]
execute 'au BufNewFile ' . g:diarydir .'/*.md :silent 0r !<sfile>:h/bin/vimwiki-diary-template "%"'