diff --git a/plugin/hsModule.vim b/plugin/hsModule.vim index cdd0f76..861009a 100644 --- a/plugin/hsModule.vim +++ b/plugin/hsModule.vim @@ -1,7 +1,13 @@ command! InsertHaskellModuleName exe "normal! i".hsModule#MkModuleHeader() if !exists('g:hs_module_no_mappings') - autocmd FileType haskell nnoremap M :InsertHaskellModuleName + if !exists('g:hs_module_mapping') + let g:hs_module_mapping = 'M' + endif + + exec 'autocmd FileType haskell nnoremap ' . + \ g:hs_module_mapping . + \ ' :InsertHaskellModuleName' endif if !exists('g:hs_module_no_auto')