diff options
Diffstat (limited to '.config/nvim/after/plugin/functions.vim')
-rw-r--r-- | .config/nvim/after/plugin/functions.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.config/nvim/after/plugin/functions.vim b/.config/nvim/after/plugin/functions.vim new file mode 100644 index 0000000..87a1072 --- /dev/null +++ b/.config/nvim/after/plugin/functions.vim | |||
@@ -0,0 +1,28 @@ | |||
1 | " Will learn to port promise | ||
2 | function! CreateNote() | ||
3 | py3 import uuid | ||
4 | exe "e! " . fnameescape("~/nextcloud/personal_wiki/text/box/" . py3eval('str(uuid.uuid4())[:6]') . ".wiki") | ||
5 | let l:text="= up =\n\n= down =\n\n= keywords =\n\n" | ||
6 | put =l:text | ||
7 | norm gg | ||
8 | endfunction | ||
9 | |||
10 | function! CreatePaper(citekey) | ||
11 | exe "e! " . fnameescape("~/nextcloud/personal_wiki/text/papers/" . a:citekey . ".wiki") | ||
12 | |||
13 | let l:timestap="%date " . strftime("%F") | ||
14 | let l:text="= Came From =\n\n= Takeaways =\n\n= Might Go To =\n\n" | ||
15 | |||
16 | put! =l:timestap | ||
17 | put =l:text | ||
18 | endfunction | ||
19 | |||
20 | function! CreateReference(citekey) | ||
21 | exe "e! " . fnameescape("~/nextcloud/personal_wiki/text/reference/" . a:citekey . ".wiki") | ||
22 | |||
23 | let l:timestap="%date " . strftime("%F") | ||
24 | let l:text="= Literature Notes =\n\n= Citation =\n\n" | ||
25 | |||
26 | put! =l:timestap | ||
27 | put =l:text | ||
28 | endfunction | ||