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
<leader>== and an arbitrary number of === following.
This commit is contained in:
Marty Oehme 2019-06-13 11:12:55 +02:00
parent 0925515457
commit 5257d3e191

View file

@ -163,19 +163,29 @@ endif
let g:wiki_filetypes = ['md', 'mkd', 'markdown', 'wiki'] let g:wiki_filetypes = ['md', 'mkd', 'markdown', 'wiki']
let g:wiki_link_extension = '.md' let g:wiki_link_extension = '.md'
let g:wiki_link_target_type = '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 = { let g:wiki_mappings_global = {
\ '<plug>(wiki-index)' : '<leader>ww', \ '<plug>(wiki-journal)' : '<leader>===',
\ '<plug>(wiki-reload)' : '<leader>wx', \ '<plug>(wiki-code-run)' : '<leader>====',
\ '<plug>(wiki-page-rename)' : '<leader>wr', \ '<plug>(wiki-graph-in)' : '<leader>====',
\ '<plug>(wiki-link-open)' : '<cr>', \ '<plug>(wiki-graph-out)' : '<leader>=====',
\ '<plug>(wiki-link-open-split)' : '<c-cr>', \ '<plug>(wiki-link-toggle)' : '<leader>=======',
\ '<plug>(wiki-link-return)' : '<bs>', \ '<plug>(wiki-page-delete)' : '<leader>========',
\ '<plug>(wiki-link-next)' : '<tab>', \ '<plug>(wiki-page-toc)' : '<leader>=========',
\ '<plug>(wiki-link-prev)' : '<s-tab>', \ '<plug>(wiki-page-toc-local)' : '<leader>=============',
\ '<plug>(wiki-graph-find-backlinks)' : '<leader>wb', \ '<plug>(wiki-export)' : '<leader>==============',
\ '<plug>(wiki-list-uniq)' : '<leader>===============',
\ '<plug>(wiki-list-uniq-local)' : '<leader>================',
\ '<plug>(wiki-tag-list)' : '<leader>=================',
\ '<plug>(wiki-tag-reload)' : '<leader>==================',
\ '<plug>(wiki-tag-search)' : '<leader>=====================',
\ '<plug>(wiki-link-toggle-operator)' : '<leader>======================',
\} \}
" PLUGIN: vim-pencil " PLUGIN: vim-pencil
" set default wrap mode to hard - TODO test which mode works better for " 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) " me, it seems hardmode has trouble with markdown lists (see issue #31)