From 607832aade951c138c21fff46bcf354b3635b858 Mon Sep 17 00:00:00 2001 From: mortang2410 Date: Tue, 9 Oct 2018 12:11:50 -0700 Subject: [PATCH 1/3] changed g:no_plugin_maps to g:close_no_plugin_maps --- plugin/bclose.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/bclose.vim b/plugin/bclose.vim index 18f3d73..d0f5277 100644 --- a/plugin/bclose.vim +++ b/plugin/bclose.vim @@ -70,6 +70,6 @@ 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 +if !exists ("g:bclose_no_plugin_maps") || !g:bclose_no_plugin_maps nnoremap bd :Bclose endif From a41383552641627d4f6f4f1627c99b32695b67e7 Mon Sep 17 00:00:00 2001 From: mortang2410 Date: Tue, 9 Oct 2018 12:13:52 -0700 Subject: [PATCH 2/3] changed README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fba89f2..de582ab 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` exists and is `true`. ## Contributing From a2566bf82159de40dfcea28ba547ee3649ab3fcb Mon Sep 17 00:00:00 2001 From: mortang2410 Date: Tue, 9 Oct 2018 12:33:59 -0700 Subject: [PATCH 3/3] preserved old variable --- README.md | 2 +- plugin/bclose.vim | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index de582ab..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:bclose_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 d0f5277..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:bclose_no_plugin_maps") || !g:bclose_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