preserved old variable

This commit is contained in:
mortang2410 2018-10-09 12:33:59 -07:00
parent a413835526
commit a2566bf821
2 changed files with 8 additions and 3 deletions

View File

@ -8,7 +8,7 @@ The reason for adding it here is to be able to add it to an existing Janus bundl
## Bindings ## Bindings
BClose binds `<Leader>bd` to `:Bclose` unless `g:bclose_no_plugin_maps` exists and is `true`. BClose binds `<Leader>bd` to `:Bclose` unless `g:bclose_no_plugin_maps` or `g:no_plugin_maps` is set to `true`.
## Contributing ## Contributing

View File

@ -70,6 +70,11 @@ function! s:Bclose(bang, buffer)
execute wcurrent.'wincmd w' execute wcurrent.'wincmd w'
endfunction endfunction
command! -bang -complete=buffer -nargs=? Bclose call <SID>Bclose('<bang>', '<args>') command! -bang -complete=buffer -nargs=? Bclose call <SID>Bclose('<bang>', '<args>')
if !exists ("g:bclose_no_plugin_maps") || !g:bclose_no_plugin_maps
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 <silent> <Leader>bd :Bclose<CR> nnoremap <silent> <Leader>bd :Bclose<CR>
endif endif