Your comments

in emacs when u press tab it indents to the correct indentation, but this means the tab key needs to be visible amd overloaded to do this

No matter where the indentation is tab will correct it like say an if then else etc