From 68ead0231e61bf9282111a8c0cbcf2fd9a64ce0c Mon Sep 17 00:00:00 2001 From: simonkellet Date: Tue, 12 Oct 2021 16:44:10 +0100 Subject: [PATCH] added vimwiki binds! --- nvim/generate-vimwiki-diary-template | 19 ++++++++++++ nvim/init.vim | 44 +++++++++++++++++++++------ nvim/spell/en.utf-8.add | 16 ++++++++++ nvim/spell/en.utf-8.add.spl | Bin 147 -> 380 bytes 4 files changed, 69 insertions(+), 10 deletions(-) create mode 100755 nvim/generate-vimwiki-diary-template 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 6024b44901ac5c465d1c4b4989fea9165d168ac8..705c6c27804306eb9346f93d7718bfdacffb2ae3 100644 GIT binary patch literal 380 zcmY*V%WA_g5Zqb!;9D>G4nvYJC=`RCh0=oW#*!aIvW*?bJ@!xgDeXuug&?%rUCqpn zR2HwxWSu+xh{*S2ZEV|LoFAs;y56?r*bPvH#mv3niV6cDa;Ta4m|1r9A*5Nu=6nZh z3GWFI(jAwLlpu40erZKkZgiUCRRyyH@);NABR0}otduZ;m|IvKKXGFtl%C2psUsn* z4<-rm=w{X}F~gr17jDZvp5r4LG`mJ=(5bAnJ)onlAmH~ivxInh=;@|c;XiC~?8dLk hl9#s+Jn8D$En5r)YSdYE0p5ta|nhCBENGB`s?7nyRFJ$hNRJUCQv*;DkZW(un8CzQ3gqMg%}oTW$OT%*%j6Tl T=m=EEz!(G)WH$y1GB5xD*PR%~