I use this
alias +toggle1 "+attack2;r_drawviewmodel 1"
alias -toggle1 "-attack2;"
alias "cloakOn" "bind mouse2 +toggle1"
alias "cloakOff" "bind mouse2 -toggle1"
bind mouse2 "+toggle1"
Works fine for me, I guess you'd also want
bind "1" "r_drawviewmodel 0".
bind "2" "r_drawviewmodel 1"
bind "3" "r_drawviewmodel 1"