Obviously you should use keys instead of console to switch weapons and items, but combining buy bindings with key binds can streamline the buying phase. Using flashbang as an example, neither +weapon_flashbang
nor +flashbang
works for switching (the command purchases the item, but the key isn't bound):
bind f "weapon_flashbang;buy flashbang;"
bind f "flashbang;buy flashbang;"