diff --git a/README.md b/README.md index fba89f2..3a5fdcd 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The reason for adding it here is to be able to add it to an existing Janus bundl ## Bindings -BClose binds `bd` to `:Bclose` unless `g:no_plugin_maps` exists and is `true`. +BClose binds `bd` to `:Bclose` unless `g:bclose_no_plugin_maps` or `g:no_plugin_maps` is set to `true`. ## Contributing diff --git a/plugin/bclose.vim b/plugin/bclose.vim index 18f3d73..232763f 100644 --- a/plugin/bclose.vim +++ b/plugin/bclose.vim @@ -70,6 +70,11 @@ function! s:Bclose(bang, buffer) execute wcurrent.'wincmd w' endfunction command! -bang -complete=buffer -nargs=? Bclose call Bclose('', '') -if !exists ("g:no_plugin_maps") || !g:no_plugin_maps - nnoremap bd :Bclose + +if exists ("g:bclose_no_plugin_maps") && g:bclose_no_plugin_maps + "do nothing +elseif exists ("g:no_plugin_maps") && g:no_plugin_maps + "do nothing +else + nnoremap bd :Bclose endif