diff --git a/nvim/generate-vimwiki-diary-template b/nvim/generate-vimwiki-diary-template new file mode 100755 index 0000000..9d3e2bf --- /dev/null +++ b/nvim/generate-vimwiki-diary-template @@ -0,0 +1,19 @@ +#!/usr/bin/python +import sys +import datetime + +template = """# {date} + +## Daily checklist + +* [ ] +* [ ] + +## Todo + +## Notes""" + +date = (datetime.date.today() if len(sys.argv) < 2 + # Expecting filename in YYYY-MM-DD.foo format + else sys.argv[1].rsplit(".", 1)[0]) +print(template.format(date=date)) diff --git a/nvim/init.vim b/nvim/init.vim index d9fd5e5..43078cf 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -26,7 +26,8 @@ Plug 'rust-lang/rust.vim' Plug 'lervag/vimtex' Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } Plug 'nanotee/zoxide.vim' - +Plug 'vimwiki/vimwiki' +Plug 'mattn/calendar-vim' call plug#end() let g:molokai_original = 1 @@ -40,22 +41,45 @@ set tabstop=4 set expandtab set number relativenumber colorscheme monokai +set nocompatible let g:livepreview_previewer = 'zathura' + +let mapleader = "," + +let g:vimwiki_list = [{'path': '~/vimwiki/', + \ 'syntax': 'markdown', 'ext': '.md'}] + +:map :setlocal spell! spelllang=en_gb + +let NERDTreeMapOpenInTab='' + +au BufNewFile ~/vimwiki/diary/*.md :silent 0r !~/.config/nvim/generate-vimwiki-diary-template '%' + + + + + + + + + + + + + + + + + + + + -autocmd FileType java setlocal omnifunc=javacomplete#Complete -nmap (JavaComplete-Imports-AddSmart) -imap (JavaComplete-Imports-AddSmart) -nmap (JavaComplete-Imports-Add) -imap (JavaComplete-Imports-Add) -nmap (JavaComplete-Imports-AddMissing) -imap (JavaComplete-Imports-AddMissing) -nmap (JavaComplete-Imports-RemoveUnused) -imap (JavaComplete-Imports-RemoveUnused) diff --git a/nvim/spell/en.utf-8.add b/nvim/spell/en.utf-8.add index b7cc56a..9c0d4b9 100644 --- a/nvim/spell/en.utf-8.add +++ b/nvim/spell/en.utf-8.add @@ -7,3 +7,19 @@ Garstang PR3 EF th +StaffId +Cname +C1 +P1 +UAE +StaffID +Nextcloud +md +markdownguide +www +Vimwiki +neovim +init +vimwiki +PlugInstall +mapleader diff --git a/nvim/spell/en.utf-8.add.spl b/nvim/spell/en.utf-8.add.spl index 6024b44..705c6c2 100644 Binary files a/nvim/spell/en.utf-8.add.spl and b/nvim/spell/en.utf-8.add.spl differ