summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2020-06-05 17:12:33 +0300
committerYigit Sever2020-06-05 17:12:33 +0300
commitfebeaf7bfd3667cdd0ddeb290915d61d543e8599 (patch)
treefd073b60ad9afc1df1e085fc7dfa73e23e44323b
parent8267a6dc1fff7959a5807b049a064c0385e9cc02 (diff)
downloaddotfiles-febeaf7bfd3667cdd0ddeb290915d61d543e8599.tar.gz
dotfiles-febeaf7bfd3667cdd0ddeb290915d61d543e8599.tar.bz2
dotfiles-febeaf7bfd3667cdd0ddeb290915d61d543e8599.zip
nvim note taking functions
-rwxr-xr-x.config/nvim/init.vim22
1 files changed, 21 insertions, 1 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 02c459f..7fc630c 100755
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -151,15 +151,35 @@ autocmd FileType rust let b:dispatch = 'cargo run'
151"}}} 151"}}}
152 152
153" Functions {{{ 153" Functions {{{
154
155function! CreateNote()
156 py3 import uuid
157 exe "e! " . fnameescape("~/Nextcloud/personal_wiki/box/" . py3eval('str(uuid.uuid4())[:6]') . ".wiki")
158 let l:text="= up =\n\n= down =\n\n= keywords =\n\n"
159 put =l:text
160 norm gg
161endfunction
162
154function! CreatePaper(citekey) 163function! CreatePaper(citekey)
155 exe "e! " . fnameescape("~/Nextcloud/personal_wiki/papers/" . a:citekey . ".wiki") 164 exe "e! " . fnameescape("~/Nextcloud/personal_wiki/papers/" . a:citekey . ".wiki")
156 165
157 let l:timestap="Report Created at: " . strftime("%c") 166 let l:timestap="%date " . strftime("%F")
158 let l:text="= Came From =\n\n= Takeaways =\n\n= Might Go To =\n\n" 167 let l:text="= Came From =\n\n= Takeaways =\n\n= Might Go To =\n\n"
159 168
160 put! =l:timestap 169 put! =l:timestap
161 put =l:text 170 put =l:text
162endfunction 171endfunction
172
173function! CreateReference(citekey)
174 exe "e! " . fnameescape("~/Nextcloud/personal_wiki/reference/" . a:citekey . ".wiki")
175
176 let l:timestap="%date " . strftime("%F")
177 let l:text="= Literature Notes =\n\n= Citation =\n\n"
178
179 put! =l:timestap
180 put =l:text
181endfunction
182
163" }}} Function " 183" }}} Function "
164 184
165"{{{Misc Settings 185"{{{Misc Settings