Merge pull request #7 from mortang2410/master
Added alternative variable "g:bclose_no_plugin_maps" to disable mapping
This commit is contained in:
commit
99018b4a2d
@ -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: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
|
||||||
|
|
||||||
|
@ -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:no_plugin_maps") || !g: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
|
||||||
|
Loading…
Reference in New Issue
Block a user