Add trailing spaces in autocompleted variables

Instead of always adding var+space, add space+var whenever there is not
a space to the left