From 5257d3e1917ec93dbe2d5dca213164b2e1ed4e6c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 13 Jun 2019 11:12:55 +0200 Subject: [PATCH] Fix keybinds for wiki.vim keeping defaults HACK HACK HACK The default keybinds for wiki.vim are now kept, only removing the ones that I don't need. For now, since wiki.vim does not seem to allow empty strings being passed as its keybinds (in order to remove them by overwriting with empty), it just assigns bogus binds with == and an arbitrary number of === following. --- .config/nvim/init.vim | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 1514c62..4eb82b3 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -163,19 +163,29 @@ endif let g:wiki_filetypes = ['md', 'mkd', 'markdown', 'wiki'] let g:wiki_link_extension = '.md' let g:wiki_link_target_type = 'md' -let g:wiki_mappings_use_defaults = 0 +let g:wiki_mappings_use_defaults = 1 +" overwrites some default mappings I don't use, or that interfere with my own +" mappings TODO: currently this just assigns bogus shortcuts, since the plugin grumbles +" when setting to an empty string let g:wiki_mappings_global = { - \ '(wiki-index)' : 'ww', - \ '(wiki-reload)' : 'wx', - \ '(wiki-page-rename)' : 'wr', - \ '(wiki-link-open)' : '', - \ '(wiki-link-open-split)' : '', - \ '(wiki-link-return)' : '', - \ '(wiki-link-next)' : '', - \ '(wiki-link-prev)' : '', - \ '(wiki-graph-find-backlinks)' : 'wb', + \ '(wiki-journal)' : '===', + \ '(wiki-code-run)' : '====', + \ '(wiki-graph-in)' : '====', + \ '(wiki-graph-out)' : '=====', + \ '(wiki-link-toggle)' : '=======', + \ '(wiki-page-delete)' : '========', + \ '(wiki-page-toc)' : '=========', + \ '(wiki-page-toc-local)' : '=============', + \ '(wiki-export)' : '==============', + \ '(wiki-list-uniq)' : '===============', + \ '(wiki-list-uniq-local)' : '================', + \ '(wiki-tag-list)' : '=================', + \ '(wiki-tag-reload)' : '==================', + \ '(wiki-tag-search)' : '=====================', + \ '(wiki-link-toggle-operator)' : '======================', \} + " PLUGIN: vim-pencil " set default wrap mode to hard - TODO test which mode works better for " me, it seems hardmode has trouble with markdown lists (see issue #31)