I want to map :bd
to :bd!
using:
command! -nargs=* -complete=buffer bd :call bd!
but vim told me "User defined commands must start with an uppercase letter"
update solutions from answer:
cnoremap bd bd!
another way
cnoreabbrev <expr> bd getcmdtype() == ":" && getcmdline() == 'bd' ? 'bd!' : 'bd'