From 7d07397a98569c38897945290daa76599d22008e Mon Sep 17 00:00:00 2001 From: Ivan Tishchenko Date: Thu, 6 Nov 2014 01:12:21 +0300 Subject: [PATCH] Enable customization of w prefix for global mappings (allow users choose their own prefix). --- doc/vimwiki.txt | 10 ++++++++++ ftplugin/vimwiki.vim | 8 ++++---- plugin/vimwiki.vim | 15 ++++++++------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt index 2ff231f..f2efcec 100644 --- a/doc/vimwiki.txt +++ b/doc/vimwiki.txt @@ -2537,6 +2537,16 @@ mother tongue like this: > The default is 'Contents'. +------------------------------------------------------------------------------ +*g:vimwiki_map_prefix* + +A string which specifies the prefix for all global mappings (and some local). +Use it to avoid conflicts with other plugins. Note that it must be defined +before the plugin loads. > + let g:vimwiki_map_prefix = 'e' + +The default is 'w'. + ============================================================================== 13. Miscellaneous *vimwiki-misc* diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim index 936ea17..a89a8a8 100644 --- a/ftplugin/vimwiki.vim +++ b/ftplugin/vimwiki.vim @@ -324,13 +324,13 @@ endif if !hasmapto('Vimwiki2HTML') - nmap wh Vimwiki2HTML + exe 'nmap '.g:vimwiki_map_prefix.'h Vimwiki2HTML' endif nnoremap