" Change local buffer to directory of current file after the plugin has loaded autocmd VimEnter * lcd %:p:h " " Override wiki index mapping to also cd into the wiki nm ww (wiki-index) " nm l (wiki-next-link) " nm h (wiki-prev-link) " nm j (wiki-link-follow) " nm k (wiki-link-return) " nm s (wiki-link-follow-split) " nm v (wiki-link-follow-vsplit) autocmd BufEnter *.md if expand('%:t') =~ '_' | echo 'hierarchical relation' | endif autocmd BufEnter *.md if expand('%:t') =~ '--' | echo 'relation' | endif autocmd BufEnter *.md if expand('%:t') =~ '<>' | echo 'dichotomy' | endif autocmd BufEnter *.md if expand('%:t') =~ 'my-' | echo 'personal file' | endif autocmd BufEnter *.md if expand('%:t') =~ 'project_' | echo 'project file' | endif " Only load wiki.vim for zk directory let g:wiki_index_name='index' " Links let g:wiki_link_extension='' " Do not automatically transform to link, use `wf` for this let g:wiki_link_target_type='md' vmap wf (wiki-link-toggle-visual) " " Links " " " Options " " " Events " " " Mappings and commands " " " Completion " let g:wiki_completion_enabled=1 let g:wiki_completion_case_sensitive=0 " " Tags " " " Templates " let g:wiki_templates = [ \ { 'match_re': '^my-', \ 'source_filename': '.my.md'}, \ { 'match_re': '^project[-_]', \ 'source_filename': '.project.md'}, \ { 'match_re': '^blog[-_]', \ 'source_filename': '.blog.md'}, \ { 'match_re': '^journal[-_]', \ 'source_filename': '.journal.md'}, \ { 'match_func': { x -> v:true }, \ 'source_filename': '.md'}, \] " " Advanced configuration " let g:wiki_filetypes=['md'] let g:wiki_root='~/.zk' let g:wiki_global_load=0 let g:wiki_link_creation = { \ 'md': { \ 'link_type': 'md', \ 'url_extension': '', \ 'url_transform': { x -> substitute(tolower(x), '\s\+', '-', 'g') }, \ }, \ '_': { \ 'link_type': 'wiki', \ 'url_extension': '', \ }, \} " let g:wiki_link_default_schemes " let g:wiki_link_schemes let g:wiki_link_toggle_on_follow=0 " let g:wiki_link_transforms " let g:wiki_mappings_use_defaults " let g:wiki_mappings_global " let g:wiki_mappings_local " let g:wiki_mappings_local_journal " ... tags " let g:wiki_template_month_names " let g:wiki_template_title_month = " let g:wiki_template_title_week " let g:wiki_ui_method let g:wiki_write_on_nav=1 let g:wiki_zotero_root='~/.local/share/zotero' " ... mappings and commands " ...